GETHEADR: Retrieving an HTTP Header Variable

How to:

The HTTP header contains variables whose values describe the Web Server environment and can specify credentials coming from the Web Server or a third-party single sign-on product. The Reporting Server can use the GETHEADR function to retrieve the value of an HTTP Header variable from an HTTP header passed to it by the client.

Syntax: How to Retrieve an HTTP Header Variable

GETHEADR('varname', output)

where:

varname

Alphanumeric

Is the name of the HTTP header variable whose value is being retrieved.

output

Alphanumeric

Is the name of the field that contains the result, or the format of the output value enclosed in single quotation marks.

Example: Retrieving the Value of an HTTP Header Variable

The following is a sample HTTP header:



The following function call retrieves the value application/x-www-form-urlencoded from the HTTP Header:

GETHEADR('content-type', 'A150')

The following function call retrieves the value en-us from the HTTP Header:

GETHEADR('accept-language', 'A10')