> ## 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.

# Add content length headers to requests

> Calculate and add content length header to the request.

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

Works out the size of each request's body and adds a `Content-Length` header to match. Use this when the service you are calling expects requests to declare their body size up front. There is nothing to configure: once the plugin is added to the connection, it measures every outgoing request and sets the header automatically.

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

## Sample data

This plugin sets a header on outgoing HTTP requests on a live connection rather than transforming integration data, so there is no before/after to show. It takes no settings; adding it to a connection is all that is needed.

```json Configuration theme={null}
{
  "prototype": "content-length",
  "parameters": {}
}
```
