ICI Modules: http
Modules by name : by typeOverview
This module is used for performing simple HTTP requests such as used in retreiving pages from web servers.
The module splits the process of performing the request into a number of phases. Firstly a new request object is created and various request attributes set. These attributes translate into HTTP request headers. Once the request has been prepared it is initiated or sent to the destination and the reply received. Following the reply header being received the user may elect to read the reply content being returned for the request or to terminate the request.
Interface
- http.request - create a new request object
- http.proxy - define HTTP proxy server
- http.getproxyhost - return proxy server host
- http.getproxyport - return proxy server port number
Request Object Methods
The object returned from calls to http.request() has a number of methods to which it responds. These methods allow the request to be initiated and various properties of the request to be accessed.
The methods are invoked using ICI's older form of method calls using the binary-@ operator.
- request@connect - initiate the HTTP request specified in a request object
- request@stream - return a file from which we can read the content
- request@status - return the HTTP status for the request
- request@disconnect - teardown the connection to the HTTP server