HTTP classes / The HTTPRequest class |
Methods for the com.HTTPRequest class.
Name | Description |
---|---|
com.HTTPRequest.Create( url STRING ) RETURNING result com.HTTPRequest |
Creates an new HTTPRequest object from a URL. |
Name | Description |
---|---|
setVersion( version STRING ) |
Sets the HTTP version of the request. |
setMethod( method STRING ) |
Sets the HTTP method of the request. |
setHeader( name STRING, value STRING ) |
Sets an HTTP header for the request. |
removeHeader( name STRING ) |
Removes an HTTP header for the request according to a name. |
clearHeaders() |
Removes all user-defined HTTP request headers. |
setCharset( charset STRING ) |
Defines the charset used when sending text or XML. |
setAuthentication( login STRING, pass STRING, scheme STRING, realm STRING ) |
Defines the user login and password to authenticate to the server. |
clearAuthentication() |
Removes user-defined authentication. |
setKeepConnection( keep BOOLEAN ) |
Defines if connection is kept open if a new request occurs. |
setTimeOut( timeout INTEGER ) |
Defines the timeout for a reading or writing operation. |
setConnectionTimeOut( timeout INTEGER ) |
Defines the timeout for the establishment of the connection. |
setMaximumResponseLength( length INTEGER ) |
Defines the maximum size in Kbyte a response. |
setAutoReply( reply BOOLEAN ) |
Defines the auto reply option for response methods. |
Name | Description |
---|---|
doRequest() |
Performs the HTTP request. |
doTextRequest( data STRING ) |
Performs the request by sending an entire string at once. |
doXmlRequest( data xml.DomDocument ) |
Performs the request by sending an entire XML document at once. |
doDataRequest( data BYTE ) |
Performs the request by sending binary data. |
doFormEncodedRequest( query STRING, utf8 BOOLEAN ) |
Performs an "application/x-www-form-urlencoded forms" encoded query. |
beginXmlRequest() RETURNING writer xml.StaxWriter |
Starts a streaming HTTP request. |
endXmlRequest( writer xml.StaxWriter ) |
Terminates a streaming HTTP request. |
Name | Description |
---|---|
getResponse() RETURNING result com.HTTPResponse |
Returns the response produced by one of request methods. |
getAsyncResponse() RETURNING result com.HTTPResponse |
Returns (asynchronously) the response produced by one of request methods. |
Name | Description |
---|---|
setMultipartType( type STRING, start STRING, boundary STRING ) |
Switch HTTPRequest in multipart mode of given type. |
addPart( p the HTTPPart object ) |
Adds a new part to the HTTP root part request. |