ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Communication / HTTP functions
  • Properties specific to restResponse variables
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
The restResponse type is used to define all the advanced characteristics of a REST response. 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.
Example
cMaRequete is httpRequest
cMaRequete.URL = "http://www.pcsoft.fr"
cMaReponse is httpResponse = RESTEnvoie(cMaRequete)
IF ErrorOccurred THEN
	Error(ErrorInfo(errFullDetails))
ELSE
	Info(cMaReponse.Content)
END
Properties

Properties specific to restResponse variables

The following properties can be used to handle the response of a REST request:
Property nameType usedEffect
ContentBufferBody of server response.
This property is read-only.
ContentTypeCharacter stringString: Type of the content of the HTTP message received.
This property is read-only.
DescriptionStatusCodeCharacter stringDescription of the StatusCode property.
This property is read-only.
HeaderAssociative array of character stringsKey/Value set of received headers.
RoughHeaderCharacter stringHeader that was returned with the response.
This property is read-only.
StatusCodeIntegerStatus 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.
Minimum version required
  • Version 20
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/20/2024

Send a report | Local help