HTTP/en

Aus expecco Wiki (Version 2.x)
Zur Navigation springen Zur Suche springen

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