joffrey-bion / krossbow

A Kotlin multiplatform coroutine-based STOMP client over websockets, with built-in conversions.
MIT License
189 stars 14 forks source link

Built-in browser web socket client doesn't allow setting `Sec-WebSocket-Protocol` #494

Closed joffrey-bion closed 4 months ago

joffrey-bion commented 4 months ago

The WebSocket API in browsers doesn't support custom headers, but it does support a protocols array, which corresponds to the Sec-WebSocket-Protocol header. If the client is called with a single Sec-WebSocket-Protocol header in the headers map, it should not eagerly fail.

joffrey-bion commented 4 months ago

Closing as duplicate of https://github.com/joffrey-bion/krossbow/issues/493