Subprotocols #23
Unanswered
davidbrochart
asked this question in
Q&A
Replies: 1 comment 5 replies
-
Well, there is no dedicated option for that. Actually, subprotocols seem to be declared in a from httpx_ws import aconnect_ws
async with aconnect_ws("http://localhost:8000/ws", headers={"Sec-WebSocket-Protocol": "sub1, sub2"}) as ws:
message = await ws.receive_text()
print(message)
await ws.send_text("Hello!") |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
wsproto
seems to support subprotocols, but I'm not sure where to pass them inhttpx-ws
. Or maybe it's not supported yet?Beta Was this translation helpful? Give feedback.
All reactions