fasthtml
fasthtml copied to clipboard
Update ws example
Adds another endpoint to examples/basic_ws.py
which illustrates how to read data from the websocket.
It is not clear from the existing example (or docs, currently) that you can specify a data
argument to the handler function to effectively get the contents of ws.receive()
. There are other hidden arguments which seem to correspond to these annotations