Share via


HeaderPropagationCollection interface

Defines the interface for managing header propagation.

Properties

incoming

The collection of incoming headers from the incoming request.

outgoing

The collection of headers that will be propagated to outgoing requests.

Methods

add(Record<string, string>)

Adds a header definition to the outgoing collection.

concat(Record<string, string>)

Concatenates a header definition to the outgoing collection.

override(Record<string, string>)

Overrides a header definition in the outgoing collection.

propagate(string[])

Propagates the incoming header value to the outgoing collection based on the header definition key.

Property Details

incoming

The collection of incoming headers from the incoming request.

incoming: Record<string, string>

Property Value

Record<string, string>

Remarks

This collection is built based on the headers received in the request.

outgoing

The collection of headers that will be propagated to outgoing requests.

outgoing: Record<string, string>

Property Value

Record<string, string>

Remarks

This collection is built based on the incoming headers and the definition provided.

Method Details

add(Record<string, string>)

Adds a header definition to the outgoing collection.

function add(headers: Record<string, string>)

Parameters

headers

Record<string, string>

Headers to add to the outgoing collection.

Remarks

If the header already exists, it will not be added.

concat(Record<string, string>)

Concatenates a header definition to the outgoing collection.

function concat(headers: Record<string, string>)

Parameters

headers

Record<string, string>

Headers to concatenate to the outgoing collection.

Remarks

If the header does not exist in the incoming headers, it will be ignored. Unless the header is already present in the outgoing collection.

override(Record<string, string>)

Overrides a header definition in the outgoing collection.

function override(headers: Record<string, string>)

Parameters

headers

Record<string, string>

Headers to override in the outgoing collection.

Remarks

If the header does not exist in the incoming headers, it will be added to the outgoing collection.

propagate(string[])

Propagates the incoming header value to the outgoing collection based on the header definition key.

function propagate(headers: string[])

Parameters

headers

string[]

List of header keys to propagate.

Remarks

If the header does not exist in the incoming headers, it will be ignored.