I need to make a number of calls to gateways and to then place the return payloads into headers. These *gateway* calls are really sending a message to a channel behind which there is a chain. It currently looks like this:

```
<int:channel id            = "call_api_a" />
<int:chain   input-channel = "call_api_a" >
    ...
</int:chain>

<int:channel id            = "call_api_b" />
<int:chain   input-channel = "call_api_b" >
    ...
</int:chain>

```

```
<int:gateway request-channel="call_api_a" />

<int:header-enricher>
    <int:header name="a" expression="payload" />
</int:header-enricher>

<int:gateway request-channel="call_api_b" />

<int:header-enricher>
    <int:header name="b" expression="payload" />
</int:header-enricher>

```

Is there an elegant way to embed the call to the gateway inside of the header-enricher?

Something like:

```
<int:header-enricher>
    <int:header name="a">
        <int:gateway request-channel="call_api_a" />
    </int:header>
</int:header-enricher>

```

I know that the above doesn't work but gives the sense of what I'd like to achieve.

Thanks for any pointers and best regards.

-aljo