Windows 上的 Python 3.7
从夸脱运行样品时
from quart import Quart, websocket
app = Quart(__name__)
@app.route('/')
async def hello():
return 'hello'
@app.websocket('/ws')
async def ws():
while True:
await websocket.send('hello')
app.run()
运行http://127.0.0.1:5000/ws时,得到
Bad Request Bad request syntax or unsupported method