ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Communication / Web services
  • Properties specific to apiRequest 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
apiRequest (Type of request)
In french: apiRequête
The apiRequest type is used to define all the advanced characteristics of a request executed via a REST web service imported using the OpenAPI documentation. These characteristics can be defined and changed 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
Req is apiRequest
Req.HTTPHeader["cle"] = "Valeur"
// Appel d'un point d'entrée du Webservice REST
// en lui passant l'entête puis les paramètres attendus
MonWebService.GetListeUtilisateur(Req, param1_WS, param2_WS)
Properties

Properties specific to apiRequest variables

The following properties can be used to handle apiRequest variables:
Property nameType usedEffect
ClientCertificateString or bufferCorresponds to:
  • a character string with an access path to the .p12 file that contains the certificate to attach to the request. The certificate will be automatically loaded taking into account:
    • the certificate in the executable library (if it has been integrated into the application),
    • the certificate at the specified location on disk (if the certificate has not been integrated into the executable library).
  • a buffer with the certificate (fLoadBuffer).
If this property corresponds to an empty string (""), the default certificate is reset to "<None>".
HTTPHeaderAssociative array of character stringsKey/Value set of headers to send.
Usage example of this property:
cMaRequête.EntêteHTTP["Authorization"] = ...
" WSSE profile=""UsernameToken"""
cMaRequête.EntêteHTTP["X-WSSE"] = ...
"UsernameToken Username=blahblah "
cMaRequête.Entête["Cache-Control"] = " no-cache"
ClientCertificatePasswordCharacter stringPassword associated with the client certificate (empty string by default)
TimeoutInteger ou DurationMaximum timeout for the connection expressed in milliseconds (20 seconds by default, which means 20000 milliseconds). This property can correspond to:
  • an integer corresponding to the number of milliseconds,
  • a Duration variable,
  • the duration in a readable format (e.g., 20 s or 20000 ms).
The connection fails if it cannot be established within this period.
Minimum version required
  • Version 28
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 07/06/2023

Send a report | Local help