jamiewest / signalr_core

ASP.NET Core SignalR Dart Client
https://pub.dev/packages/signalr_core
MIT License
90 stars 58 forks source link

Is it possible to set up custom headers during handshake #57

Open DmitriyDN opened 3 years ago

DmitriyDN commented 3 years ago

In nodeJS package for signalR there is an ability to set headers that can be parsed in connect/disconnect events on the server (in case of HTTP handshake).

https://www.npmjs.com/package/@microsoft/signalr

Is it possible to add such ability there?

IHttpConnectionOptions.d.ts

interface IHttpConnectionOptions {
    /** {@link @microsoft/signalr.MessageHeaders} containing custom headers to be sent with every HTTP request. Note, setting headers in the browser will not work for WebSockets or the ServerSentEvents stream. */
    headers?: MessageHeaders;
    httpClient?: HttpClient;
    transport?: HttpTransportType | ITransport;
    logger?: ILogger | LogLevel;
    logMessageContent?: boolean;
    skipNegotiation?: boolean;
    withCredentials?: boolean;
}
DarioSiroki commented 2 years ago

check #39