jamiewest / signalr_core

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

Adding possibility for custom headers in the initial HTTP Request #91

Closed bennibau closed 1 year ago

bennibau commented 2 years ago

In my project I need the possibility to send a custom header which is needed for authentication so I extended the library to consume option custom headers. They are attached to the HTTP request in the same manner as the Authentication header from the token factory is added.

bennibau commented 1 year ago

@jamiewest could you merge that change?

roustamdev commented 1 year ago

[log] The HttpConnection connected successfully. [log] Sending handshake request. [log] (WebSockets transport) sending data. String data of length '32'. Content: '{"protocol":"json","version":1}'. [log] Using HubProtocol 'json'. [log] (WebSockets transport) socket closed. [VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: Exception: WebSocket closed with status code: 1002 (null). can't connect