Summary:
See also: The Genero Web ServicesCOM Library
The HTTP Response class provides an interface to perform XML and TEXT responses over HTTP, with additional XML streaming possibilities. Notice that status is set to zero after a successful method call.
com.HTTPResponse
Object Methods | |
Name | Description |
getStatusCode() RETURNING INTEGER |
Returns the HTTP
status code. When the returned HTTP status code is 401 or 407, authorization is required. See the setAuthentication() method of the HTTPRequest class from the Genero Web Services COM Library. |
getStatusDescription()
RETURNING STRING |
Returns the HTTP status description. |
getHeader( STRING )
RETURNING STRING |
Returns the
value of the HTTP header name, or NULL if there is
none. Throws an exception in case of errors, and updates status with an error code. |
getHeaderCount()
RETURNING INTEGER |
Returns the
number of headers. Throws an exception in case of errors, and updates status with an error code. |
getHeaderName( INTEGER)
RETURNING STRING |
Returns the name
of the header at position index. Throws an exception in case of errors, and updates status with an error code. |
getHeaderValue( INTEGER )
RETURNING STRING |
Returns the
value of the header at position index. Throws an exception in case of errors, and updates status with an error code. |
beginXmlResponse()
RETURNING xml.StaxReader |
Begins the
streaming HTTP response and returns a xml.StaxReader object
ready to read XML from the server. Note: The Content-Type header must be of the form */xml or */*+xml, for instance application/xhtml+xml. Throws an exception in case of errors, and updates status with an error code. |
endXmlResponse( |
Ends the
streaming HTTP response by closing the Stax reader.
Throws an exception in case of errors, and updates status with an error code. |
getXmlResponse() RETURNING
xml.DomDocument |
Returns an
entire xml.DomDocument
as response from the server. Note: The Content-Type header must be of the form */xml or */*+xml, for instance application/xhtml+xml. Throws an exception in case of errors, and updates status with an error code. |
getTextResponse()
RETURNING STRING |
Returns an
entire string as response from the server. Note: The Content-Type header must be of the form text/*, for instance text/richtext. Note: Automatic conversion to the locale charset is performed when possible, otherwise throws an exception. Throws an exception in case of errors, and updates status with an error code. |
For examples, refer to The HTTP Request Class Examples.