AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Comunicación / Funciones HTTP
Envía una solicitud de REST y espera la respuesta del servidor.
Ejemplo
cMyRequest is restRequest
cMyRequest.URL = "<server address>"
cMyResponse is restResponse = cMyRequest.Send()
IF ErrorOccurred THEN
Error(ErrorInfo(errFullDetails))
ELSE
Info(cMyResponse.Content)
END
// The code sample below explains how to call a WINDEV REST Webservice with parameters.
// The procedure found in the Webservice has the following format:
// PRIVATE PROCEDURE UpdateTopBar(bTestMode is boolean)
 
// The test URL has the following format:
// http://<Server IP>/<Common component>
//?test
 
// WLanguage code used to call it by passing the parameter
cMyRequest is restRequest
cMyRequest.Method = httpGet
cMyRequest.URL = "http://<Server IP>/CDM/UpdateTopBar/1"
//Where CDM is the common component and 1 the parameter value
 
cMyResponse is restResponse = cMyRequest.Send()
IF ErrorOccurred THEN
Error(ErrorInfo(errFullDetails))
ELSE
IF cMyResponse.Content = True THEN
Info("The site was updated.")
ELSE
Error(cMyResponse.Content)
END
END
Sintaxis

Sintaxis sincrónica: espere la respuesta Ocultar los detalles

<REST response> = <REST request>.Sends()
<REST response>: restResponse Variable
Nombre de restResponse Variable que contiene la respuesta recibida del servidor REST.
<REST request>: restResponse Variable
Nombre de la restRequest Variable que contiene las características de la solicitud REST que se enviará al servidor.
Observaciones
Clasificación Lógica de negocio / UI: Lógica de negocio
Componente: wd290com.dll
Versión mínima requerida
  • Versión 26
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 01/07/2023

Señalar un error o enviar una sugerencia | Ayuda local