Skip to content

forceWebsockets and cookies #66

@digitalbrain

Description

@digitalbrain

Hello,
first of all, thank you for sharing this work, it is very useful.
I'm working on a iOs app that integrate socket.ios, i need to send cookies also when forceWebsockets is setted to true.
It seems like WebSocket doesn't sends cookies with the request also if SocketIOClient has cookies.

My app instantiate SocketIOClient in this way:
self.socket = SocketIOClient(socketURL: endpoint, options: ["forceWebsockets" : true, "cookies" : cookiesToSet])
but the server doesn't receive any cookies.
I've solved this issue by adding manually the cookies header in WebSocket (createHTTPRequest) .
Are there another way to accomplish this?
It is a right to send cookies using WebSocket transport?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions