PC SOFT

AYUDA EN LÍNEA
DE WINDEV, WEBDEV Y WINDEV MOBILE

  • Notes
  • Security error in a secure transaction
  • Required permissions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Otros
Procedimientos almacenados
HTTPSend (Function)
 
Sends an HTTP request and waits for the response from the HTTP server.
Versiones 22 y posteriores
Android This function is now available for Android applications.
Widget Android This function is now available in Android Widget mode.
WEBDEV - Código Navegador This function is now available in browser code.
Nueva funcionalidad versión 22
Android This function is now available for Android applications.
Widget Android This function is now available in Android Widget mode.
WEBDEV - Código Navegador This function is now available in browser code.
Android This function is now available for Android applications.
Widget Android This function is now available in Android Widget mode.
WEBDEV - Código Navegador This function is now available in browser code.
Ejemplo
cMyRequest is httpRequest
cMyRequest..URL = "http://www.windev.com"
cMyResponse is httpResponse = HTTPSend(cMyRequest)
IF ErrorOccurred THEN
Error(ErrorInfo(errFullDetails))
ELSE
Info(cMyResponse..Content)
END
Sintaxis

Syntax that is using an httpRequest variable Ocultar los detalles

<HTTP response> = HTTPSend(<HTTP request>)
<HTTP response>: httpResponse variable
Name of httpResponse variable containing the response received from the HTTP server.
<HTTP request>: httpRequest variable
Name of httpRequest variable containing the characteristics of the HTTP request that will be sent to the server.

Simplified syntax for sending a request Ocultar los detalles

<HTTP response> = HTTPSend(<URL>)
<HTTP response>: httpResponse variable
Name of httpResponse variable containing the response received from the HTTP server.
<URL>: Character string (with quotes)
URL to interrogate.
Versiones 22 y posteriores
WEBDEV - Código Navegador

Asynchronous syntax that is using an httpRequest variable Ocultar los detalles

HTTPSend(<HTTP request> , <WLanguage procedure>)
<HTTP request>: httpRequest variable
Name of httpRequest variable containing the characteristics of the HTTP request that will be sent to the server.
<WLanguage procedure>: Character string
Name of WLanguage procedure called during the response from the HTTP server. This procedure has the following format:
PROCEDURE <Procedure name>(<Response> is httpResponse)
where <Response> is an httpResponse variable containing the response received from the HTTP server.
Nueva funcionalidad versión 22
WEBDEV - Código Navegador

Asynchronous syntax that is using an httpRequest variable Ocultar los detalles

HTTPSend(<HTTP request> , <WLanguage procedure>)
<HTTP request>: httpRequest variable
Name of httpRequest variable containing the characteristics of the HTTP request that will be sent to the server.
<WLanguage procedure>: Character string
Name of WLanguage procedure called during the response from the HTTP server. This procedure has the following format:
PROCEDURE <Procedure name>(<Response> is httpResponse)
where <Response> is an httpResponse variable containing the response received from the HTTP server.
WEBDEV - Código Navegador

Asynchronous syntax that is using an httpRequest variable Ocultar los detalles

HTTPSend(<HTTP request> , <WLanguage procedure>)
<HTTP request>: httpRequest variable
Name of httpRequest variable containing the characteristics of the HTTP request that will be sent to the server.
<WLanguage procedure>: Character string
Name of WLanguage procedure called during the response from the HTTP server. This procedure has the following format:
PROCEDURE <Procedure name>(<Response> is httpResponse)
where <Response> is an httpResponse variable containing the response received from the HTTP server.
Versiones 22 y posteriores
WEBDEV - Código Navegador

Simplified asynchronous syntax for sending a request Ocultar los detalles

HTTPSend(<URL> , <WLanguage procedure>)
<URL>: Character string (with quotes)
URL to interrogate.
<WLanguage procedure>: Character string
Name of WLanguage procedure called during the response from the HTTP server. This procedure has the following format:
PROCEDURE <Procedure name>(<Response> is httpResponse)
where <Response> is an httpResponse variable containing the response received from the HTTP server.
Nueva funcionalidad versión 22
WEBDEV - Código Navegador

Simplified asynchronous syntax for sending a request Ocultar los detalles

HTTPSend(<URL> , <WLanguage procedure>)
<URL>: Character string (with quotes)
URL to interrogate.
<WLanguage procedure>: Character string
Name of WLanguage procedure called during the response from the HTTP server. This procedure has the following format:
PROCEDURE <Procedure name>(<Response> is httpResponse)
where <Response> is an httpResponse variable containing the response received from the HTTP server.
WEBDEV - Código Navegador

Simplified asynchronous syntax for sending a request Ocultar los detalles

HTTPSend(<URL> , <WLanguage procedure>)
<URL>: Character string (with quotes)
URL to interrogate.
<WLanguage procedure>: Character string
Name of WLanguage procedure called during the response from the HTTP server. This procedure has the following format:
PROCEDURE <Procedure name>(<Response> is httpResponse)
where <Response> is an httpResponse variable containing the response received from the HTTP server.
Observaciones

Notes

  • To find out the runtime errors of this function, use ErrorOccurred and ErrorInfo.
  • If the management of cookies is implemented for the specified request (HTTPCookieManage), the cookies are updated in the httpRequestvariable after the call to HTTPSend. Therefore, during the next call to HTTPSend with this request, the cookies will be taken into account.
  • Versiones 21 y posteriores
    From version 21, the redirections are automatically taken into account in the HTTP requests. To manually process the redirections in the HTTP requests, you must use ..IgnoreError of httpRequest variable associated with the httpIgnoreRedirection constant.
    Nueva funcionalidad versión 21
    From version 21, the redirections are automatically taken into account in the HTTP requests. To manually process the redirections in the HTTP requests, you must use ..IgnoreError of httpRequest variable associated with the httpIgnoreRedirection constant.
    From version 21, the redirections are automatically taken into account in the HTTP requests. To manually process the redirections in the HTTP requests, you must use ..IgnoreError of httpRequest variable associated with the httpIgnoreRedirection constant.
  • AndroidWidget Android Up to version 23, this function is available only for devices with ARM processors. A fatal error occurs if this function is used with devices not equipped with ARM processors (x86, mips, ...). Up to version 23, this function is available only for devices equipped with ARM processors or an ARM emulator. Otherwise (and on the Samsung Galaxy Tab 3 tablet), a fatal error will occur.
    From version 24, devices equipped with x86 processors (therefore Samsung Galaxy Tab 3 tablets) can use this function as well.

Security error in a secure transaction

During a secure transaction, the request may fail due to security errors:
  • invalid certificate or certificate coming from an unknown company.
  • the site name specified in the certificate does not correspond to a server.
  • invalid or expired certificate date.
  • redirection to a non-secure server.
These errors are returned by ErrorInfo.
If one of these errors occurs, you can re-run the request while ignoring the errors. To do so, all you have to do is modify the ..IgnoreError property of httpRequest variable:
Error returned by ErrorInfo
(with the errCode constant)
Value of ..IgnoreError property of httpRequest variable
(these values can be combined)
Description
httpErrorInvalidCertificate
Invalid certificate or certificate coming from an unknown company
httpIgnoreInvalidCertificateThe certificate is ignored.
httpErrorInvalidCertificateName
The site name specified in the certificate does not correspond to a server
httpIgnoreInvalidCertificateNameThe site name specified in the certificate is ignored.
httpErrorExpiredCertificate
Invalid or expired certificate date
httpIgnoreExpiredCertificateThe certificate date is ignored
httpErrorRedirectToHTTP
Redirection to a non-secure server
httpIgnoreRedirectToHTTPThe redirection to a non-secure server is allowed.
httpIgnoreRedirectToHTTPS
Redirection to a secure server
httpIgnoreRedirectToHTTPSThe redirection to a secure server is allowed.
httpIgnoreRevocationThe certificate found in the list of revoked certificates is not checked.
Notes:
  • When the HTTP queries are run in several threads, the HTTP.IgnoreError variable has a specific value for each thread.
  • Versiones 22 y posteriores
    AndroidWidget Android The following errors are supported: httpIgnoreExpiredCertificate, httpIgnoreInvalidCertificate, httpIgnoreInvalidCertificateName, httpIgnoreRevocation, httpIgnoreRedirection.
    Nueva funcionalidad versión 22
    AndroidWidget Android The following errors are supported: httpIgnoreExpiredCertificate, httpIgnoreInvalidCertificate, httpIgnoreInvalidCertificateName, httpIgnoreRevocation, httpIgnoreRedirection.
    AndroidWidget Android The following errors are supported: httpIgnoreExpiredCertificate, httpIgnoreInvalidCertificate, httpIgnoreInvalidCertificateName, httpIgnoreRevocation, httpIgnoreRedirection.
Versiones 22 y posteriores
AndroidWidget Android

Required permissions

The call to this function modifies the permissions required by the application.
Required permission: INTERNET.
This permission allows the applications to open the network sockets.
Nueva funcionalidad versión 22
AndroidWidget Android

Required permissions

The call to this function modifies the permissions required by the application.
Required permission: INTERNET.
This permission allows the applications to open the network sockets.
AndroidWidget Android

Required permissions

The call to this function modifies the permissions required by the application.
Required permission: INTERNET.
This permission allows the applications to open the network sockets.
Componente : wd250com.dll
Versión mínima requerida
  • Versión 20
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario