elastic/elasticsearch-perl

Support for custom HTTP headers

Closed this issue · 1 comments

It would great if the client could emit a custom HTTP header with every request. Two options should be available to register such a header: as global option and on a per-request basis.

Did you try

$e = Search::Elasticsearch->new(
    nodes       => [ 'search1', 'search2' ],
    default_headers => {
        'X-Opaque-Id' => $id,
    },
)

?