elasticsearch-perl icon indicating copy to clipboard operation
elasticsearch-perl copied to clipboard

Support for custom HTTP headers

Open philkra opened this issue 5 years ago • 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.

philkra avatar Apr 29 '20 15:04 philkra

Did you try

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

?

Skeeve avatar Dec 04 '20 09:12 Skeeve