CX_HTTP_REQUEST
Class hierarchy
- CX_CLASS
- CX_HTTP_REQUEST 159571
Description:
class to make the various aspects of an HTTP request accessible in the InstantView code in an ordered manner. If a message is called via an HTTP request, an object of the type CX_HTTP_REQUEST is on the stack.
The specification of an http request can be found at http://tools.ietf.org/html/rfc2616#section-5
The specification for decomposing the request URL can be found here: http://tools.ietf.org/html/rfc2616#section-3.2.2
The class distinguishes between URL(Query) and body parameters. Query parameters are sent with the HTTP request in the URL in the form ?name=value&name2=value2. For HTML forms of type POST, the parameters are normally transmitted in the body. The content type is then set to application/x-www-form-urlencoded or formdata/multipart. If the Web service server detects such a content type, the body is interpreted and the body parameters are stored separately from the query parameters. In this way, a query received via the web service can be correctly reconstructed at SendRequest .
Code example:
The http request
would be forwarded to the following message implementation:
Note that the original request path ("call_person") has been converted to capital letters and the method ("GET") has been appended to obtain the name of the message to be called.
Function | MA* | Parameters | Return | Brief description |
---|---|---|---|---|
GetBody | STRING | Delivers the body of the HTTP request. | ||
GetBodyAsBase64 222628 | STRING | Returns the body as a base64 encoded string. | ||
GetBodyAsFile 222628 | STRING | Writes the body to the specified file | ||
GetParameterNames | VECTOR | Returns the names of the URL and body parameters. | ||
GetParameter | STRING | STRING | Returns the value of a specific URL or body parameter | |
GetHeaderNames | VECTOR | Returns the names of the HTTP headers of the request | ||
GetHeader | STRING | STRING | Returns the value of a specific HTTP header | |
GetHostName | STRING | Returns the target host of the request | ||
GetMethod | STRING | Returns the HTTP method (GET/POST/PUT/DELETE/...) | ||
GetTime | CX_DATETIME | If SetReceiveMessage is set in the WebService Manager, the time of the request is returned | ||
GetURL | STRING | Returns the relative path that was specified in the request. In the example above: "/call_person | ||
SetBody | STRING | Sets the HTTP body | ||
SetBodyFromBase64 222628 | STRING | Sets the body from a base64-encoded string | ||
SetBodyFromFile 222628 | STRING | Sets the body from the content of the passed file. | ||
SetHeader | STRING, STRING | Sets an HTTP request header | ||
SetMethod | STRING | Sets the HTTP request type (GET,POST,HEAD,PUT,CONNECT,TRACE) | ||
Set parameters | STRING, STRING | Sets an HTTP request parameter | ||
SetProxy | STRING | Sets the proxy to be used for SendRequest. | ||
SetQueryParameter | STRING, STRING | Sets an HTTP query parameter | ||
SetURL | STRING | Sets the request url(& protocol, port, host, query) |
* MA = Member Access function,
grey background = inherited function
Data field | Type | Reference class | I* | Brief description |
---|---|---|---|---|
*I = Indexable data field,
grey background = inherited data field
Module | Brief description |
---|---|