Teya.SSE (teya v0.4.1)

Copy Markdown View Source

SSE streaming helper for Teya POSLink streaming endpoints.

Wraps Req with the req_server_sent_events plugin to decode the byte stream into events. JSON-decodes the data field of each event and forwards decoded maps to the caller process as {ok_tag, id, event_type, data} messages. Non-200 responses and transport errors are forwarded as {error_tag, id, reason}.