> For the complete documentation index, see [llms.txt](https://sevenval.gitbook.io/flat/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sevenval.gitbook.io/flat/cookbook/pass-header-field-upstream.md).

# How can I pass an arbitrary header field to an upstream system?

Use [pair producers](/flat/reference/templating/pair-producer.md) to copy the wanted header fields of the incoming request ([`$request/headers`](/flat/reference/variables.md#predefined-variables)) to the [`request` action configuration](/flat/reference/actions/request.md). Here we pass `User-Agent` and `Accept`:

```markup
<flow>
  <request>
  {
    "url": "http://httpbin.org/get",
    "headers": {
        {{: $request/headers/user-agent }}
        {{: $request/headers/accept }}
    }
  }
  </request>
</flow>
```

We can reduce this further to

```markup
    "headers": {
        {{: $request/headers/user-agent | $request/headers/accept }}
    }
```

or maybe even more readable using [`with`](/flat/reference/templating/with.md):

```markup
    "headers": {
        {{with $request/headers }} {{: user-agent | accept }} {{end}}
    }
```
