PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
WebserviceReadHTTPHeader (Function)
In french: WebserviceLitEntêteHTTP
AjaxNot available
Reads the HTTP header received during a call to a REST Webservice. 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 HTTP header. The header is formatted as follows:
  • The header name is returned in uppercase characters.
  • The dashes are replaced by "underscore" characters (the source name of the HTTP header as it was sent by the client is not available).
  • An empty string ("") is returned if there is no other header to read.
<Name of Header to Read>: Character string with quotes
Name of header to read.

Reading the HTTP header identified by its subscript Hide the details

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