Closed enlight3d closed 10 months ago
Well, I'm closing this issue, for future people searching for the same thing, you can't use .set but you must do it this way :
mSocketOptions?.extraHeaders = mapOf("Authorization" to listOf("Bearer $token"))
mSocket.disconnect().connect()
Hello, I already checked the issues here concerning my question, but I can't get this working. I tried to implement what is mentioned here : https://socketio.github.io/socket.io-client-java/initialization.html#auth concerning updating the map but I always get errors when I try to do that.
The provided code is for the java, I tried to adapt it for kotlin this way:
Concerning the errors that I get, it's the same as mentioned in this issue https://github.com/socketio/socket.io-client-java/issues/630
I'm using io.socket:socket.io-client:2.0.0