PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Properties specific to the description of httpResponse variables
  • Limits
  • Multiple HTTP responses
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
httpResponse (Type of variable)
In French: httpRéponse
The httpResponse type is used to get the advanced characteristics of the response of HTTP/HTTPS request. The characteristics of this response can be defined and modified by several WLanguage properties.
Note: See Declaring a variable for more details.
Versions 22 and later
Android Widget This type of variable is now available in Android Widget mode.
Android This type of variable is now available for the Android applications.
WEBDEV - Browser code This property is now available in browser code.
New in version 22
Android Widget This type of variable is now available in Android Widget mode.
Android This type of variable is now available for the Android applications.
WEBDEV - Browser code This property is now available in browser code.
Android Widget This type of variable is now available in Android Widget mode.
Android This type of variable is now available for the Android applications.
WEBDEV - Browser code This property is now available in browser code.
Example
cMyRequest is httpRequest
cMyResponse is httpResponse
cMyRequest..URL = "http://www.windev.com"
cMyResponse = HTTPSend(cMyRequest)
IF ErrorOccurred THEN
Error(ErrorInfo(errFullDetails))
ELSE
Info(cMyResponse..Content)
END
Remarks

Properties specific to the description of httpResponse variables

The following properties can be used to handle the response of an HTTP/HTTPS request:
Property nameType usedEffect
StatusCodeIntegerStatus of response. This property corresponds to one of the codes of HTTP protocol. The most common codes are:
  • 200: Request successfully processed
  • 301: Document moved permanently
  • 302: Document moved temporarily
  • 403: The server understood the request but it refuses to run it.
  • 404: Resource not found
  • 500: Internal server error
  • 503: Service temporarily unavailable or in maintenance
..DescriptionStatusCode is used to get the description of error code.
This property is available in read-only.
ContentTypeCharacter stringString: Type of content for the received HTTP message.
This property is available in read-only.
ContentBufferBody of server response.
This property is available in read-only.
DescriptionStatusCodeCharacter stringDescription corresponding to ..StatusCode.
This property is available in read-only.
HeaderAssociative array of character stringsKey/Value set of received headers.
RoughHeaderCharacter stringHeader that was returned with the response.
This property is available in read-only.

Note: These properties can be used via one of the following syntaxes:
  • <Variable Name>..<Property Name>
  • <Variable Name>.<Property Name>
AndroidAndroid Widget

Limits

This type of variable is available for the devices equipped with ARM processors. A fatal error occurs if this type of variable is used with devices not equipped with ARM processors (x86, mips, ...). This type of variable is available for the devices equipped with ARM processors or using an ARM emulation. Otherwise (and on the Samsung Galaxy Tab 3 tablet), a fatal error will occur.

Multiple HTTP responses

If the response contains several HTTP results (if a proxy adds an HTTP code for example), the ..StatusCode and ..DescriptionStatusCode properties return the values of first HTTP response. In this case, ..RoughHeader contains all responses.
Minimum required version
  • Version 20
This page is also available for…
Comments
Click [Add] to post a comment