GetRequestHeader

Description

Gets the request header by name.

Applies to

HTTPClient and RestClient objects

Syntax

objectname.GetRequestHeader ( headerName )

Argument

Description

objectname

The name of the HTTPClient or RestClient object in which you want to get the request header by name

headerName

A string value specifying the header name


Return value

String.

Returns a string value related to the specified header. If the argument's value is null, the method returns null.

Examples

This example gets the request header by name:

HttpClient lnv_HttpClient
lnv_HttpClient = Create HttpClient

lnv_HttpClient.GetRequestHeader("Accept")
lnv_HttpClient.GetRequestHeader("Accept-Encoding")
lnv_HttpClient.GetRequestHeader("Accept-Language")
lnv_HttpClient.GetRequestHeader("Connection")
lnv_HttpClient.GetRequestHeader("User-Agent")
lnv_HttpClient.GetRequestHeader("Cache-Control")

See also

ClearRequestHeaders

GetRequestHeaders

SetRequestHeader

SetRequestHeaders