|
|
|
|
|
- Properties specific to httpResponse variables
- Multiple HTTP responses
httpResponse (Variable type) In french: httpRéponse
The httpResponse type is used to get the advanced characteristics of the response of the HTTP/HTTPS request. You can define and change the characteristics of the request using different WLanguage properties. Note: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable. cMaRequête is httpRequest
cMaRéponse is httpResponse
cMaRequête.URL = "http://www.pcsoft.fr"
cMaRéponse = HTTPSend(cMaRequête)
IF ErrorOccurred THEN
Error(ErrorInfo(errFullDetails))
ELSE
Info(cMaRéponse.Content)
END
Properties Properties specific to httpResponse variables The following properties can be used to handle the response of an HTTP/HTTPS request: | | | Property name | Type used | Effect |
---|
Content | Buffer | Body of server response. This property is read-only. | ContentType | Character string | Type of content for the received HTTP message. This property is read-only. | DescriptionStatusCode | Character string | Description of the StatusCode property. This property is read-only. | Header | Associative array of character strings | Key/Value set of received headers. | RoughHeader | Character string | Header that was returned with the response. This property is read-only. | StatusCode | Integer | Status of response. This property corresponds to one of the codes of HTTP protocol. The most common codes are: - 200: Query successfully processed
- 301: Document moved permanently
- 302: Document moved temporarily
- 403: The server has understood the request, but refuses to execute it.
- 404: REsource not found
- 500: Internal server error
- 503: Service temporarily unavailable or under maintenance
The DescriptionStatusCode property gets the description of the error code. This property is read-only. |
Remarks Multiple HTTP responses If the response contains multiple HTTP results (for example, if a proxy adds an HTTP code), the StatusCode and DescriptionStatusCode properties return the values of the first HTTP response. In this case, the RoughHeader property contains all responses.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|