AMPscript
GetValue
Remove
SetValue
Validate Your Server-Side JavaScript using WSProxy
Sets the value of an HTTP header.
You can’t use this function to change the host and content-length headers. The value of host is always set to the domain of the URL that the request was sent to. The value of content-length is always set to the length of the content in the request.
Note
SetValue(1, 2)
| Ordinal | Type | Description |
|---|---|---|
| 1 | string | Required. The name of the header to set. |
| 2 | string | Required. The value to set for the header. |
This example sets the From address in the HTTP header.
1HTTPHeader.SetValue("From", "aruiz@example.com");