> ## Documentation Index
> Fetch the complete documentation index at: https://docs.alumio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Set request headers

> Set a specific list of headers for requests based on the user supplied key value pairs.

export const FormField = ({property, label, required = false, diType, uiPatterns, children}) => {
  const patterns = Array.isArray(uiPatterns) ? uiPatterns : uiPatterns ? [uiPatterns] : [];
  return <div style={{
    margin: '1.5rem 0'
  }}>
      <div style={{
    display: 'flex',
    alignItems: 'baseline',
    flexWrap: 'wrap',
    gap: '0.5rem',
    marginBottom: '0.25rem'
  }}>
        <strong>{label}</strong>
        <span style={{
    fontSize: '0.7rem',
    fontWeight: 600,
    textTransform: 'uppercase',
    letterSpacing: '0.04em',
    color: required ? '#6241f5' : '#6b7280'
  }}>
          {required ? 'Required' : 'Optional'}
        </span>
      </div>

      <div>{children}</div>

      {diType || patterns.length > 0 ? <p style={{
    fontSize: '0.85rem',
    color: '#6b7280',
    marginBottom: 0
  }}>
          {diType ? <>
              See the <a href={`/references/${diType}`}>{diType}</a> reference.{' '}
            </> : null}
          {patterns.length > 0 ? <>
              Accepts a <a href={`/documentation/placeholders-and-patterns/patterns#${patterns[0]}`}>pattern</a>.
            </> : null}
        </p> : null}
    </div>;
};

Sets headers on every request the connection sends, replacing any existing header of the same name. Unlike appending, this guarantees the value you enter is exactly what gets sent. Use this when an API requires a fixed header on each call, such as a content type, an API version, or a custom header the service expects.

This documentation describes: [Schema](/schemas/http-client-plugin-configurator/header-set)

## Fields

<FormField property="headers" label="Headers">
  The headers to set on each request, entered as name and value pairs. Add a row for every header you want to control. Each value overwrites any header of the same name already on the request. To add a value without replacing an existing one, use the Append request headers plugin instead.
</FormField>

## Sample data

This plugin sets fixed headers on outgoing requests rather than transforming entity data, so there is no before/after to show. The example below forces the `Content-Type` and an API version header on every request the connection makes.

| Field   | Value                                                      |
| ------- | ---------------------------------------------------------- |
| Headers | `Content-Type` = `application/json`, `X-Api-Version` = `2` |

```json Configuration theme={null}
{
  "prototype": "header-set",
  "parameters": {
    "headers": {
      "Content-Type": "application/json",
      "X-Api-Version": "2"
    }
  }
}
```
