ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Communication / Web services
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
WebserviceReadHTTPHeader (Function)
In french: WebserviceLitEntêteHTTP
AjaxNot available
Reads the HTTP header received in a call to a SOAP or REST web service. These HTTP headers are sent by the client to the server in the current request.
Example
// Validates the origin of the request (CORS protocol)
sOrigin is string = WebserviceReadHTTPHeader("Origin")
// Validate the origin
...
Syntax

Reading the HTTP header identified by its name Hide the details

<HTTP header> = WebserviceReadHTTPHeader(<Name of header to read>)
<HTTP header>: Character string
Value of the HTTP header. The header is formatted as follows:
  • The header name is returned in uppercase characters.
  • Hyphens are replaced with underscores (the original name of the HTTP header as sent by the client is not available).
  • An empty string ("") is returned if there are no more headers to read.
<Name of header to read>: Character string
Name of the header to be read.

Reading the HTTP header identified by its index Hide the details

<HTTP header> = WebserviceReadHTTPHeader(<Index>)
<HTTP header>: Character string
Value of the HTTP header. The header is formatted as follows:
  • The header name is returned in uppercase characters.
  • Hyphens are replaced with underscores (the original name of the HTTP header as sent by the client is not available).
  • An empty string ("") is returned if there are no more headers to read.
<Index>: Integer
Index of the header to be read. To read all HTTP headers, increment this index until the function returns an empty string.
Component: wd290awws.dll
Minimum version required
  • Version 22
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 01/10/2024

Send a report | Local help