---
schema_version: "1"
id: 5e55a15111bab0204d19ea0d8bf5ebde02d18320ed8f8e3f8a8187ef4178ac5f
title: HttpRequestHeader()
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/ampscript/references/fun_http/mc-ampscript-reference-http-request-header.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-http/mc-ampscript-reference-http-request-header.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 4182b043eed88f4a07ae800baa75f6c08e0ce63f0f2538985b45f337ec8be70d
products:
  - AMPscript for Marketing Cloud
  - Marketing Cloud
---
# HttpRequestHeader()

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](https://datatracker.ietf.org/doc/html/rfc7231) on IETF.org
