com.HTTPRequest methods

Methods for the com.HTTPRequest class.

Table 1. Class methods
Name Description
com.HTTPRequest.Create(
   url STRING )
  RETURNS com.HTTPRequest
Creates a new HTTPRequest object from an URL.
Table 2. Object methods: Configuration methods
Name Description
clearAuthentication()
Removes user-defined authentication.
clearHeaders()
Removes all user-defined HTTP request headers.
removeHeader(
   name STRING )
Removes a named HTTP request header.
setAuthentication(
   login STRING,
   pass STRING,
   scheme STRING,
   realm STRING )
Defines the user login and password to authenticate to the server.
setAutoReply(
   val INTEGER )
Defines the auto reply option for response methods.
setCharset(
   charset STRING )
Defines the charset used when sending text or XML.
setConnectionTimeOut(
   timeout INTEGER )
Defines the timeout for the establishment of the connection.
setHeader(
   name STRING,
   value STRING )
Sets an HTTP header for the request.
setMethod(
   method STRING )
Sets the HTTP method of the request.
setKeepConnection(
   keep INTEGER )
Defines whether a connection is kept open if a new request occurs.
setMaximumResponseLength(
   length INTEGER )
Defines the maximum size in Kbytes of a response.
setTimeOut(
   timeout INTEGER )
Defines the timeout for a reading or writing operation.
setVersion(
   version STRING )
Sets the HTTP version of the request.
Table 3. Object methods: Sending methods
Name Description
beginXmlRequest()
  RETURNS xml.StaxWriter
Starts a streaming HTTP request.
endXmlRequest(
   stax xml.StaxWriter )
Terminates a streaming HTTP request.
doDataRequest(
   b BYTE )
Performs the request by sending binary data.
doFileRequest(
   filename STRING )
Performs the request by sending data contained in a file.
doFormEncodedRequest(
   query STRING,
   utf8 INTEGER )
Performs an "application/x-www-form-urlencoded forms" encoded query.
doRequest()
Performs the HTTP request.
doTextRequest(
   str STRING )
Performs the request by sending an entire string at once.
doXmlRequest(
   doc xml.DomDocument )
Performs the request by sending an entire XML document at once.
Table 4. Object methods : Response methods
Name Description
getAsyncResponse()
  RETURNS com.HTTPResponse
When available, returns the response produced by one of request methods.
getResponse()
  RETURNS com.HTTPResponse
Waits for and returns the response produced by one of request methods.
Table 5. Object methods of com.HTTPRequest : Multipart methods
Name Description
addPart( part com.HTTPPart )
Adds a new part to the HTTP root part request.
setMultipartType(
   type STRING,
   start STRING,
   boundary STRING )
Switch HTTPRequest in multipart mode of a given type.
Table 7. Object methods of com.HTTPRequest: Proxy management
Name Description
setProxy(
   host STRING,
   port INTEGER )
Configure the proxy URL.
setProxyAuthentication(
   login STRING,
   password STRING,
   scheme STRING,
   realm STRING )
Define the login and password to use for proxy authentication.