Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Websocket Subprotocol support #935

Open
barthorre opened this issue Apr 15, 2021 · 1 comment
Open

Websocket Subprotocol support #935

barthorre opened this issue Apr 15, 2021 · 1 comment
Labels
enhancement todo issue is still valid and waiting for contributor

Comments

@barthorre
Copy link
Contributor

It seems there is no support for adding subprotocols to a websocket request.

For Akka backend you can customize the websocket request directly to solve the issue:

AkkaHttpBackend(customizeWebsocketRequest = { request => request.copy(subprotocol = Some("protocol)) })

Others allow you to manually set the Sec-WebSocket-Protocol header directly. (AHC for instance)
HttpClient however throws an exception when trying to add the header.

Are there plans to support subprotocols in a generic way across all backends?
Or can I just open a PR adding it to HttpClientAsyncBackend, since that is what I need at the moment?

@adamw
Copy link
Member

adamw commented Apr 21, 2021

HttpClient support is done - by handling the headers appropriately.

Would be great to implement this in other backends as well, & add a test :)

@Pask423 Pask423 added enhancement todo issue is still valid and waiting for contributor labels Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement todo issue is still valid and waiting for contributor
Projects
None yet
Development

No branches or pull requests

3 participants