websocket-client icon indicating copy to clipboard operation
websocket-client copied to clipboard

How to connect with custom header cookie

Open huyvandnc opened this issue 5 years ago • 2 comments

Hi all, i didn't find it in the document, but can i add the cookie like this

WebSocket = new WebsocketClient(new Uri(url))
{
headers.Add("Cookie","my cookie");
};

Thanks!

huyvandnc avatar Nov 02 '20 03:11 huyvandnc

Hello @huyvandnc ,

yes, it is possible, see advanced configuration documentation.

Also here is an exact example of setting headers: https://github.com/Marfusios/websocket-client/issues/52

Marfusios avatar Nov 02 '20 08:11 Marfusios

I got it! Thank you for your timely response! @Marfusios

huyvandnc avatar Nov 02 '20 14:11 huyvandnc