PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
  • Properties specific to the description of restResponse variables
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
The restResponse type is used to define all the advanced characteristics of a REST response. The characteristics of this response can be defined and modified using different WLanguage properties.
Remark: 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 = RESTSend(cMaRequete)
IF ErrorOccurred THEN
Error(ErrorInfo(errFullDetails))
ELSE
Info(cMaReponse.Content)
END
Remarks

Properties specific to the description of restResponse variables

The following properties can be used to handle the response of a REST 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
The description StatusCode property is used to obtain the description of the error code.
This property is available in read-only mode.
ContentTypeCharacter stringString: Type of content for the received HTTP message.
This property is available in read-only mode.
ContentBufferBody of server response.
This property is available in read-only mode.
DescriptionStatusCodeCharacter stringdescription corresponding to Property State Code.
This property is available in read-only mode.
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 mode.
Minimum version required
  • Version 20
This page is also available for…
Comments
Click [Add] to post a comment