Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom websocket request headers #496

Closed
cquesnel opened this issue Dec 13, 2018 · 1 comment
Closed

Custom websocket request headers #496

cquesnel opened this issue Dec 13, 2018 · 1 comment

Comments

@cquesnel
Copy link
Contributor

cquesnel commented Dec 13, 2018

Hi,

I was wondering if there was a reason for which the requestHeaders for a websocket connection are not configurable through the options builder. From what I see all the code is there, and would only require an overload to WithWebSocketServer in MqttClientOptionsBuilder such as :

public MqttClientOptionsBuilder WithWebSocketServer(string uri, IDictionary<string, string> requestHeaders)
{
    _webSocketOptions = new MqttClientWebSocketOptions
    {
        Uri = uri,
        RequestHeaders = requestHeaders
    };

    return this;
}

I was asking because when using an AWS custom authorizer for validating connections, it needs some information passed through headers.

I can fork and start a pull request if you wish.

Thanks for your help,
Charles

@chkr1011
Copy link
Collaborator

Hi,
yes please create a pull request. Please take care for backward compatibility when adding parameters to functions of the options builder.

This was not added because no one ever asked for it 😄

Best regards
Christian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants