HTTP/en: Unterschied zwischen den Versionen

Aus expecco Wiki (Version 2.x)
Zur Navigation springen Zur Suche springen
Zeile 8: Zeile 8:
provides (among many more) the following protocol:
provides (among many more) the following protocol:


*'''get:''''url'<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 '''accept:'''acceptedMimeTypes '''fromDocument:'''documentURL '''userName:'''user '''password:'''passwd '''cookies:'''aCollectionOfCookiesOrNil '''maxCountFollowMoved:'''maxCountFollowed


*'''request:'''getOrPostOrHead<br>'''url:'''urlOrPathArg '''fromHost:'''hostOrNil '''port:'''portNrOrNil <br>'''proxy:'''(HTTPProxyQuery isNil ifTrue:[nil] ifFalse:[HTTPProxyQuery query])<br>'''accept:'''acceptedMimeTypes '''fromDocument:'''documentURL<br>'''userName:'''userOrNil '''password:'''passwordOrNil<br>'''cookies:'''aCollectionOfCookiesOrNil<br>'''contentType:'''contentType '''contents:'''contents<br>'''destinationFile:'''destinationFilenameOrNil<br>'''additionalHeaderLines:'''nil
*'''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:34 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