MergeHeaders

Merge data into the container’s headers.

mergeHeaders(headers)

Merge an object into the container’s headers.

Arguments

Argument Type Description
headers object Object to merge into the headers container.

Example

If the container’s headers currently contains those data:

{
  "Content-Type": "application/json",
}

You can add values with the mergeHeaders worker like that:

const workflow = [
  mergeHeaders({ 'gateway-id': '007' }),
];

The resulting container’s headers will be:

{
  "Content-Type": "application/json",
  "gateway-id": "007"
}

This worker can be useful on some cases, but generally speaking, you sould rethink twice before using it.