DOCUMENTATION -- Correction in websockets.md (#1011)

Correct the exception class from `starlette.websockets.Disconnect` to `starlette.websockets.WebSocketDisconnect`
This commit is contained in:
Yaakov Belch 2020-07-27 13:38:02 +03:00 committed by GitHub
parent aee9106364
commit 1db80104f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -68,7 +68,7 @@ Use `websocket.send_json(data, mode="binary")` to send JSON over binary data fra
* `await websocket.receive_bytes()`
* `await websocket.receive_json()`
May raise `starlette.websockets.Disconnect()`.
May raise `starlette.websockets.WebSocketDisconnect()`.
JSON messages default to being received over text data frames, from version 0.10.0 onwards.
Use `websocket.receive_json(data, mode="binary")` to receive JSON over binary data frames.