SSE Fixture
Exercises SSE open and receive authoring.
$ SSE_ORIGIN = [[ sse_origin = https://example.com ]]
---
Open price stream
protocol = sse
session = prices
GET {{ SSE_ORIGIN }}/prices/stream
# Stream opens successfully
^ & status == 200
---
Receive update
session = prices
receive
within = 5s
& sse.id -> $EVENT_ID
# Event type is price
^ & sse.event == "price"
# Captures the SSE id
^ $EVENT_ID == "evt-1"
# Event payload keeps the symbol
^ & body.symbol == "AAPL"
# Event payload price is numeric
^ & body.price === NUMBER