Skip to content
Docs menu · Inspect traffic

Inspect traffic

New in 1.1

Read streaming responses

On this page

A request that takes a while appears in the traffic list while it is still open, and grows as its response arrives. A server-sent events or JSON lines response, such as an LLM answer, also gets an Events tab.

Watch a request while it is open

ReqRes lists a request that is still open 250 ms after it started. A response that is a stream by its type appears as soon as its response head arrives: server-sent events, JSON lines, gRPC, gRPC-Web, Connect streaming and multipart/x-mixed-replace.

While the request is open, its row shows where it is:

PhaseCodeURL starts withDuration
No response yetA grey hourglass"Waiting"Counts up each second.
Response arrivingThe status code"Streaming" and the size so far, as in "Streaming 34.1 KB"Counts up each second.

When the request finishes, the finished row replaces the open one in the same place.

The response Body tab shows the text as it arrives, under a line that says how much has arrived, for example: "Streaming — 34.1 KB received so far, 12 complete events. The text grows as it arrives; the final row replaces it." A body that is not text, or whose encoding ReqRes does not decode while it arrives, shows its byte count, and the body comes with the final row.

A stream that keeps sending is never cut. ReqRes closes one only after 300 s with nothing moving in either direction.

When a row shows Ended

A row reads "Ended" with a question mark when its end was never recorded. Capture stopped while it was open, or ReqRes heard nothing about it for over 6 minutes. Its detail opens with "Ended without its final row". What it shows is the last thing ReqRes heard, and it has no response body.

Read events in the Events tab

The Events tab appears beside Body for a response of type text/event-stream, or of a JSON lines type such as application/x-ndjson or application/jsonl. It is there while the stream is still arriving too.

A summary line comes first, for example: "Anthropic Messages · 38 events · first event +412 ms · longest gap 1,030 ms (after #7)". For a stream that is not an LLM answer it names the format, "Server-sent events" or "JSON lines".

Each complete event is one entry:

  • Its number, such as #3.
  • Its name: the event's own name, the type in its JSON, or "message" for server-sent events and "line" for JSON lines.
  • When it arrived, in milliseconds after the response started, such as "+1,204 ms".
  • Its data, with JSON indented. An event that reports an error is marked Error.

A long event shows its first 16 KB and says how much more the Body tab has.

When the Events tab did not follow a stream while it was open, the summary says "arrival times not recorded". The ⓘ beside it explains: "This stream reached ReqRes as one finished body, so when each event arrived was not recorded. Times appear for streams watched while they are open." An event cut off at the end is not shown. A line such as "37 bytes pending — an incomplete event at the end is withheld" counts it instead.

Read an LLM answer put back together

For an Anthropic Messages, OpenAI Chat Completions or OpenAI Responses stream, the Events tab puts the answer back together.

A line under the summary gives the model, the stop reason, the tokens in, out and cached, the number of tool calls, and whether the answer is complete. It says "still streaming" while the stream is open, and "ended without its end marker" when the stream stopped early.

Click Assembled answer to expand the answer. It shows the text, then each tool call with its name, its id and its arguments. Thinking and refusal blocks appear under their own headings. An error event appears above the answer, with its number, type and message.

What an agent reads

  • list_sessions marks an open request IN_FLIGHT waiting, with the seconds so far, or IN_FLIGHT streaming, with the bytes and complete events so far. The finished row keeps the same uid. ENDED_WITHOUT_FINAL_ROW marks a row whose end was never recorded.
  • wait_for_session takes until: headers returns when the response head arrives, first_message when the first complete event arrives, and complete, the default, when the request finishes.
  • get_session shows no body and no cURL for a request that is still open.
  • get_session with view=events returns the numbered events, 50 per page and at most 200. With view=assembled it returns the LLM answer put back together. Both work while the stream is open and leave out the unfinished event at the end.
  • Values are redacted event by event. An event that helped spell a redacted value is marked "delta withheld".
  • Both views read the current capture run only. get_saved_session returns a saved stream as its whole body.
  • export_sessions leaves out requests that are still open.

Limits

  • While a stream that is not text is open, such as gRPC, its Body tab shows only the byte count.
  • A request that is still open, or that ended without its final row, cannot be saved. Save a session explains saving.
  • ReqRes keeps the first 16 MB of each request's bodies. The text stops growing there, and every byte is still sent on.
  • In the free version, an HTTPS request uses 1 HTTPS inspection however long it streams.