https://kotlinlang.org logo
Title
o

Ovsyannikov Alexey

01/16/2023, 11:40 AM
Hello everybody :) I am using websockets in android app with okhttp engine and faced the problem that defaultRequest do not set cookie in websocket request. Do anybody know how to fix it and what can be the reason of it?
a

Aleksei Tirman [JB]

01/16/2023, 2:15 PM
Unfortunately, I cannot reproduce your problem with the following configuration:
val client = HttpClient(OkHttp) {
    install(DefaultRequest) {
        headers {
            cookie("name", "value")
        }
    }
    install(WebSockets) {}
}
o

Ovsyannikov Alexey

01/17/2023, 3:52 AM
That was mine mistake, sorry for disturbing