configurapi-runner-ws
v1.10.0
Published
Websocket runner for configurapi.
Readme
configurapi-runner-ws
- Use
Eventfor an incoming data. - User
Responsefor a regular response data. - Use
StreamResponsefromconfigurapi-handler-wsfor a stream response.- With a stream response, data will be delivered from the server in chunks.
- A check will have
x-stream: chunkheader. - The last chunk will have
x-stream: doneheader. - Check
x-stream-id: $idheader for the stream ID. A chunk belonging to the same stream will have the same stream ID.
- A check will have
- With a stream response, data will be delivered from the server in chunks.
- connectionId is available at
event.request.headers.connectionId on_connectandon_disconnectwill be called when a new connection is made or closed.- Use
Request.headers['push-function']to send an out-of-band message. The function is async and accepts an object to send back to the caller. - Use
on_connectto perform authorization. Sec-WebSocket-Protocolis automatically returned foron_connectevents.
