signalr_client
signalr_client copied to clipboard
To use Authorize
If you want to use [Authorize], you can use IOWebSocketChannel instead of WebSocketChannel to pass Header.
_webSocket = IOWebSocketChannel.connect(Uri.parse(url), headers: {
'Authorization':
'Bearer ${_accessTokenFactory != null ? await _accessTokenFactory!() : ''}'
});
It is also possible to transmit the entire header by slightly modifying the code in part lib/web_socket_transport.dart.
If you want to use [Authorize], you can use IOWebSocketChannel instead of WebSocketChannel to pass Header.