HTTP/en: Unterschied zwischen den Versionen

Aus expecco Wiki (Version 2.x)
Zur Navigation springen Zur Suche springen
Zeile 10: Zeile 10:
*'''get:'''urlString<br>Retrieve a document. Returns a response object containing detailed status info and (if OK) the retrieved data. This is a convenience entry for the basic request: below.
*'''get:'''urlString<br>Retrieve a document. Returns a response object containing detailed status info and (if OK) the retrieved data. This is a convenience entry for the basic request: below.


*'''get:'''urlOrPath '''fromHost:'''host '''port:'''portNrOrNil '''accept:'''acceptedMimeTypes '''fromDocument:'''documentURL '''userName:'''user '''password:'''passwd '''cookies:'''aCollectionOfCookiesOrNil '''maxCountFollowMoved:'''maxCountFollowed
*'''get:'''urlOrPath '''fromHost:'''host '''port:'''portNrOrNil '''<br> accept:'''acceptedMimeTypes '''<br> fromDocument:'''documentURL '''<br> userName:'''user '''password:'''passwd '''<br> cookies:'''aCollectionOfCookiesOrNil '''<br> maxCountFollowMoved:'''maxCountFollowed


*'''request:'''getOrPostOrHead<br>'''url:'''urlOrPathArg '''fromHost:'''hostOrNil '''port:'''portNrOrNil <br>'''proxy:proxyOrNil<br>'''accept:'''acceptedMimeTypes '''fromDocument:'''documentURL<br>'''userName:'''userOrNil '''password:'''passwordOrNil<br>'''cookies:'''aCollectionOfCookiesOrNil<br>'''contentType:'''contentType '''contents:'''contents<br>'''destinationFile:'''destinationFilenameOrNil<br>'''additionalHeaderLines:'''stringCollOrNil
*'''request:'''getOrPostOrHead<br>'''url:'''urlOrPathArg '''fromHost:'''hostOrNil '''port:'''portNrOrNil <br>'''proxy:proxyOrNil'''<br> '''accept:'''acceptedMimeTypes '''fromDocument:'''documentURL<br> '''userName:'''userOrNil '''password:'''passwordOrNil<br> '''cookies:'''aCollectionOfCookiesOrNil<br>'''contentType:'''contentType '''contents:'''contents<br>'''destinationFile:'''destinationFilenameOrNil<br>'''additionalHeaderLines:'''stringCollOrNil

Version vom 23. März 2018, 10:36 Uhr

For HTTP, the underlying Smalltalk/X framework already provides classes to implement both HTTP-client and HTTP-server code. Detailed information is found in the online documentation and/or the source code itself.

Also, the standard library contains blocks to send HTTP requests and to setup a server which responds to incoming HTTP requests.

Programmatic API:

From within an elementary action, HTTP requests are initiated via the HTTPInterface class, which provides (among many more) the following protocol:

  • get:urlString
    Retrieve a document. Returns a response object containing detailed status info and (if OK) the retrieved data. This is a convenience entry for the basic request: below.
  • get:urlOrPath fromHost:host port:portNrOrNil
    accept:
    acceptedMimeTypes
    fromDocument:
    documentURL
    userName:
    user password:passwd
    cookies:
    aCollectionOfCookiesOrNil
    maxCountFollowMoved:
    maxCountFollowed
  • request:getOrPostOrHead
    url:urlOrPathArg fromHost:hostOrNil port:portNrOrNil
    proxy:proxyOrNil
    accept:acceptedMimeTypes fromDocument:documentURL
    userName:userOrNil password:passwordOrNil
    cookies:aCollectionOfCookiesOrNil
    contentType:contentType contents:contents
    destinationFile:destinationFilenameOrNil
    additionalHeaderLines:stringCollOrNil



Copyright © 2014-2024 eXept Software AG