diff --git a/docs/source/tour.rst b/docs/source/tour.rst index a331d7d..c50c1c7 100644 --- a/docs/source/tour.rst +++ b/docs/source/tour.rst @@ -184,6 +184,19 @@ If you'd like a view to be executed before every request, simply do the followin Now all requests to your HTTP Service will include an ``X-Pizza`` header. +WebSocket Support +----------------- + +Responder supports WebSockets:: + + @api.route('/ws', websocket=True) + async def ws1(ws): + await ws.accept() + while True: + name = await ws.receive_text() + await ws.send_text(f"Hello {name}!") + await ws.close() + Using Requests Test Client --------------------------