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 httpResponse variables
  • Multiple HTTP responses
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
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.
Example
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 nameType usedEffect
ContentBufferBody of server response.
This property is read-only.
ContentTypeCharacter stringType of content for the received HTTP message.
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.
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.
Minimum version required
  • Version 20
This page is also available for…
Comments
Video HttpResonse
https://youtu.be/-BpL9wZDmeM

https://windevdesenvolvimento.blogspot.com/2019/02/dicas-2026-windev-mobile-webservice-022.html


SOLICITACAO_HTTP is httpRequest
RESPOSTA_HTTP is httpResponse
sUrl is string="http://nots-amarildo/empresa/{nEmpresaid}"
sUrl=Replace(sUrl,"{nEmpresaid}","13")
SOLICITACAO_HTTP..URL = sUrl
SOLICITACAO_HTTP..Method = httpDelete
SOLICITACAO_HTTP..ContentType = "multipart/form-data"
SOLICITACAO_HTTP..Content = ""
HTTPCreateForm("FormData")
RESPOSTA_HTTP = HTTPSendForm("FormData", SOLICITACAO_HTTP)
EDT_RETORNO=RESPOSTA_HTTP..Content
amarildo
25 Feb. 2019

Last update: 09/19/2024

Send a report | Local help