You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure if it makes sense allowing media here, since websocket has no concept of mime type etc, so it's likely fine to just require that the body is already serialized
Maybe an MVP could be to add support for this thing in the error handling, so that HTTP errors would be serialized using the correct code and headers. We would probably still need a synthetic resp object though 🤔
I meant that ideally we would like to automatically handle this for HTTPError and HTTPStatus, then we might need a resp (but it is easy to create one). A simple deny() does not need it indeed.
This is an extension that allows sending a custom http response over websocket, to deny the upgrade from http to websocket. It's defined here: https://asgi.readthedocs.io/en/latest/extensions.html#websocket-denial-response
It can be sent only before accepting a websocket connection.
The api could be something like
Not sure if it makes sense allowing media here, since websocket has no concept of mime type etc, so it's likely fine to just require that the body is already serialized
as for supporting asgi framework, uvicorn does support it https://www.uvicorn.org/release-notes/#added_8
The text was updated successfully, but these errors were encountered: