---
schema_version: "1"
id: e873038d2c5394f009096b6313d4a833f43feb839ed84f7e191be5704de1e8b3
title: SetValue
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/guides/mc-programmatic-content/ssjs_utilitiesSetValue.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_utilitiesSetValue.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: b7c0a36d2f8568d97820023e106615d4fca9be8afee2249084b695ea768dd70c
products:
  - Marketing Cloud Engagement APIs and Programmatic Languages
  - Marketing Cloud
---
# SetValue

Sets the value of an HTTP header.

**note:** 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.

## Syntax

`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. |

## Usage

This example sets the `From` address in the HTTP header.

```js
HTTPHeader.SetValue("From", "aruiz@example.com");
```
