> ## 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 default headers of requests

> Set the default headers for requests.

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 fallback header values for every request the connection sends. A default header is only applied when the request does not already have a header of that name, so anything set elsewhere on the request wins and these values fill in the gaps. Use this when you want a sensible standard value, such as a default `Accept` or `User-Agent`, while still letting individual requests override it.

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

## Fields

<FormField property="headers" label="Headers">
  The default headers, entered as name and value pairs. Add a row for every header you want a fallback value for. Each value is only used when the request does not already set that header. To always force a value, use the Set request headers plugin instead.
</FormField>

## Sample data

This plugin fills in default headers on outgoing requests rather than transforming entity data, so there is no before/after to show. The example below sets a default `Accept` and `User-Agent` that are used only when the request has not already set them.

| Field   | Value                                                  |
| ------- | ------------------------------------------------------ |
| Headers | `Accept` = `application/json`, `User-Agent` = `Alumio` |

```json Configuration theme={null}
{
  "prototype": "header-defaults",
  "parameters": {
    "headers": {
      "Accept": "application/json",
      "User-Agent": "Alumio"
    }
  }
}
```
