Skip to content

Allow some means to modify the request message when running on .NET core #2108

Closed
@jessegavin

Description

@jessegavin

Describe the feature:

We are using ElasticSearch on AWS. In our situation we need to be able to sign each request to ElasticSearch by adding an Authorization header.

The HttpConnection class provides a protected virtual method named CreateWebRequest. I can extend HttpConnection and override this method to add the Authorization header. This works great. In fact there's a Nuget package which does exactly this. See their AwsHttpConnection implementation.

However, ElasticSearch.Net has a different implementation of HttpConnection for .NET Core which does not provide this same "hook". The CreateHttpRequestMessage method is private static. I can't figure out a way to add the Authorization header required to use NEST to for ES on AWS.

Is this something that could be added?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions