tiaanduplessis/react-native-websocket

Send Headers?

Opened this issue · 3 comments

Como enviar cabeçalhos via tag?

is there any way that I can send JWT for authentication?

looking at the source code it uses the global webSockets, it seems that you can't send a header, there is this doc here from mozilla explaining:

https://developer.mozilla.org/pt-BR/docs/WebSockets/Escrevendo_aplicacoes_cliente_WebSocket

you could use Sec-WebSocket-Protocol, to pass values that are injected into the header.

I would love to use this component but I don't know how to pass headers. Authorization is must.