Retrieves the header from an HTTP request for a landing page. You can only use this function to retrieve the standard HTTP headers outlined in RFC 7231.
Availability
<table> <tr> <td>Marketing Cloud Engagement</td> <td>✅ Yes</td> </tr> <tr> <td>Marketing Cloud Next</td> <td>❌ No</td> </tr> </table>Syntax
HttpRequestHeader(headerToRetrieve)
The HttpRequestHeader(headerToRetrieve) function has one parameter:
headerToRetrieve(string): Required. The header that you want to retrieve.
Function Properties
To use this function, pass it the name of the header that you want to retrieve.
%%=HTTPRequestHeader('User-Agent')=%%
The function returns the value of the User-Agent header for the HTTP request.
See Also
- RFC 7231 on IETF.org