Returns the value of a header converted to the variable type.
Value = &DataType.GetHeader(Character-expression)
Where:
Character-expression
Name of the header
Value
Value of the header; any type will be converted.
Extended Data Types: HttpClient, HttpRequest
Generators:
.NET,
Java, Ruby (up to GeneXus X Evolution 3), Visual FoxPro (up to GeneXus X Evolution 3)
Example 1
&value = &httpclient.GetHeader(“User-Agent”)
If the value of the “User-Agent” header is “GeneXus”, its value is stored in the &value variable.
Example 2
The following image shows the Response and Request headers of this article.

HttpClient Data Type
HttpRequest Data Type
List of HTTP header fields