> ## 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 encoding headers

> Set encoding headers (TE and Accept-Encoding) for the requests based on user selection.

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>;
};

Adds encoding headers to outgoing requests so the service knows you can handle compressed responses. Use this to tell the server it may send data back in a compressed form (such as gzip), which can reduce transfer sizes. You choose which of the two headers to add; each one is set to a fixed list of supported encodings.

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

## Fields

<FormField property="addTE" label="Add TE header">
  An on/off toggle that adds a `TE` header set to `gzip, deflate, chunked`. This signals which transfer encodings the connection accepts.
</FormField>

<FormField property="addAcceptEncoding" label="Add Accept Encoding header">
  An on/off toggle that adds an `Accept-Encoding` header set to `gzip, deflate`. This signals that the connection can accept compressed responses.
</FormField>

## Sample data

This plugin sets headers on outgoing HTTP requests on a live connection rather than transforming integration data, so there is no before/after to show. The configuration below adds the `Accept-Encoding` header but leaves out the `TE` header.

| Field                      | Value |
| -------------------------- | ----- |
| Add TE header              | off   |
| Add Accept Encoding header | on    |

```json Configuration theme={null}
{
  "prototype": "encoding-header-set",
  "parameters": {
    "addTE": false,
    "addAcceptEncoding": true
  }
}
```
