FastAPI WebSocket 报错Unsupported upgrade request

chrome提示

WebSocket connection to 'ws://localhost:8000/ws' failed: Error during WebSocket handshake: Unexpected response code: 400

Uvicorn在新版本后[>= 0.12]有关,不会自动提供websocket实现。
尝试pip install uvicorn [standard],即可正常工作。

你可能感兴趣的:(FastAPI WebSocket 报错Unsupported upgrade request)