StreamscopeStreamscope sends HTTP requests from
Streamscope reads REST Client's request syntax, so you can keep your existing Features
Quick start
The response panel opens beside the editor and adds each event as it arrives. To cancel a running request, click Stop above the request or in the panel. Next, capture a value from one of the events and use it in another request. Streaming responsesEach request has one response panel, and a new run of the request replaces what it shows. The panel has six views:
Streamscope detects NDJSON and Server-Sent Events from the response bytes as well as the A long stream keeps its newest events in memory and older ones on disk, so it can run for hours. Streamscope: Save Response saves the body as received, after decompression, and Streamscope: Show History lists the last 50 runs of the session. CapturesA
When a value is ready
A stream labelled Waiting and failuresA request that needs a pending value waits for it, up to A capture that fails, for example because the event never arrived or a field is missing, blocks the requests that need it and gives the reason. After a run, each Capturing a value from the responseIn the response panel, click a value in an expanded event or in the Body view, then click Capture This Value…. In an event or body opened in the editor, put the cursor on the value and run Streamscope: Capture This Value…. Streamscope suggests a name, writes the line on the request that produced the response, for example Secret capturesWrite A masked capture shows as ChecksA
Each check settles at the first event that decides it, while the stream is still running, and does not change afterwards: The Checks view lists every check with its expected and actual values, such as File runsEach
Writing requestsA request is a request line, optional header lines, a blank line and an optional body. Lines starting with
VariablesWrite
With this order, To read from a specific request, write System variables start with
A shift is a whole number and a unit: DirectivesDirectives are comment lines before the request line:
With Editor supportHover over What Streamscope sendsStreamscope sends the headers you write. Besides what HTTP needs ( Environments and secretsEnvironmentsStreamscope reads environments from REST Client's Choose the active environment from the status bar or with Streamscope: Select Environment. Streamscope remembers the choice per workspace. Secrets
|
| Expression | Value |
|---|---|
status |
The status code |
headers["x-request-id"] |
A response header. The name is case-insensitive, and repeated headers are joined with , |
cookies.session |
A cookie set by this response's Set-Cookie headers |
body |
The body, parsed when it is JSON, otherwise its text. On an event stream, read events instead |
first(cond), last(cond) |
The first or last event that matches cond; without a condition, the first or last event |
nth(3, cond) |
The third matching event, counting from 1 |
all(cond) |
The list of matching events; a path after it applies to each one |
count(cond) |
How many events match |
text |
The reply text assembled from an LLM stream, as in the Reply view |
jsonpath("$.items[0].id") |
A JSONPath query (RFC 9535) on the body, or on the list of events of a stream |
exists(x) |
Checks only: true when x has a value |
before(cond1, cond2) |
Checks only: true when the first event matching cond1 comes before the first matching cond2 |
unique(list) |
Checks only: true when the list has no repeated items |
A jsonpath(…) query that matches one node gives its value, several give a list, and none gives no value.
Event conditions
Inside first(…), last(…), nth(…), all(…), count(…), before(…) and # @until, a bare name such as type or result.status reads a field of the event. @ is the whole event, and @sse.event and @sse.id are a Server-Sent Event's event and id fields.
Paths
.nameor["name"]reads a field, and[0]reads an item of a list. A negative index such as[-1]counts from the end.[*]takes every item of a list, and[?status == "ok"]takes the items that match a condition, in which bare names read the item's fields. Both give a list.
Operators
- Comparisons:
==,!=,<,<=,>and>=. x in ["a", "b"]is true whenxis an item of the list.x contains "a"is true when the textxcontains"a", or when the listxhas"a"as an item.x startsWith "a"is true when the textxstarts with"a", andx matches /^run-\d+$/tests a regular expression.&&,||,!and parentheses combine conditions.
Filters
A filter follows |:
| Filter | Effect |
|---|---|
default("none") |
Gives this value when the expression has none. Without it, a missing value makes the capture fail |
join(",") |
Joins a list into one text |
json |
Turns the value into compact JSON, so a text keeps its quotes |
match(/orders\/(\d+)/) |
Gives the first group of a regular expression, or the whole match when the pattern has no group |
Values
- Literals are texts in double or single quotes, numbers,
true,false,null, lists such as["a", "b"], and regular expressions such as/run-\d+/i. - Regular expressions accept the flags
i,m,sandu. Backreferences and lookaround are not supported. - A captured text is inserted as it is, and a whole number keeps every digit. Other numbers are inserted the way JavaScript prints them, so
1.50becomes1.5. An object or list is inserted as compact JSON.
Settings
| Setting | Default | Description |
|---|---|---|
streamscope.request.connectTimeout |
30s |
How long to wait for the connection, including the TLS handshake |
streamscope.request.headersTimeout |
300s |
How long to wait for the response headers once connected |
streamscope.request.followRedirects |
true |
Follow redirects; # @no-redirect turns it off for one request |
streamscope.request.maxRedirects |
10 |
The most redirects to follow for one request |
streamscope.request.caFile |
"" |
A PEM file of extra certificate authorities to trust, added to the default and system ones. Absolute or relative to the workspace folder |
streamscope.capture.waitTimeout |
30s |
How long a request waits for a captured value that has not arrived yet |
streamscope.stream.maxEventSize |
16MiB |
The largest single event to read; a larger one becomes an oversize event with a preview |
streamscope.stream.memoryEvents |
10000 |
How many of the newest events of a stream stay in memory; older ones are read from disk |
streamscope.stream.maxSpillSize |
512MiB |
The most raw data kept on disk for one streaming response |
streamscope.stream.maxTotalSpillSize |
2GiB |
The most raw data kept on disk across all runs in the history |
streamscope.stream.typeFields |
["type","event","object"] |
The JSON fields whose value labels an event, tried in order |
streamscope.view.default |
events |
The view a streaming response opens on until you pick another: events, reply or raw |
streamscope.codeLens.enabled |
true |
Show Send Request and the last outcome above each request |
Durations accept 500ms, 30s or 5m, and sizes 512KiB, 16MiB or 2GiB.
Commands
Commands are in the Command Palette under Streamscope:. Those that act on a request or a response appear when an .http file or a response is active. You can bind any command to a key in Keyboard Shortcuts.
| Command | What it does |
|---|---|
| Streamscope: Send Request | Sends the request under the cursor (Cmd+Alt+Enter, Ctrl+Alt+Enter) |
| Streamscope: Stop Request | Stops the request under the cursor |
| Streamscope: Run File | Runs every request of the file in the Testing view |
| Streamscope: Show Response | Shows the response panel of the request under the cursor, or of a response document |
| Streamscope: Switch Response View… | Picks the panel's view: Events, Reply, Raw, Headers, Body or Checks |
| Streamscope: Open Response Body in Editor | Opens the response body as an editor document |
| Streamscope: Open Response Headers in Editor | Opens the Headers view as an editor document |
| Streamscope: Save Response | Saves the body as received, after decompression |
| Streamscope: Capture This Value… | Writes a # @capture line for the value under the cursor in an event or body document |
| Streamscope: Show History | Lists the session's last 50 runs |
| Streamscope: Select Environment | Picks the active environment |
| Streamscope: Set Secret | Stores a value for {{$secret name}} |
| Streamscope: Clear Secret | Removes a stored secret |
| Streamscope: List Secrets | Lists the names of stored secrets, never their values |
| Streamscope: Move to Secret Storage | Moves a file variable's value into secret storage. Not in the Command Palette: use the quick fix on the variable's line |
| Streamscope: Show Log | Opens Streamscope's output log |
Using Streamscope with REST Client
Streamscope uses the same http language as REST Client and reads its request syntax, request references, system variables and rest-client.environmentVariables setting, so both extensions can open the same files. When REST Client or httpyac is installed, Streamscope offers once to turn off their Send link above each request, so only one shows. Streamscope's shortcut, Cmd+Alt+Enter (Ctrl+Alt+Enter), does not clash with REST Client's.
Not supported in this release:
- GraphQL requests, cURL import and export, and code snippet generation
- A cookie jar: cookies from one response are not sent with later requests
- Prompt variables (
# @prompt) and request confirmation (# @note) - Digest, AWS Signature v4, Azure AD and OpenID Connect authentication, and client certificates. Basic authentication from user info in the URL works.
{{name.request.…}}references, and XPath in{{name.response.body…}}
Privacy
Streamscope sends no telemetry, needs no account, and makes no network requests except the ones you send. Responses stay on your machine. Streamscope keeps the newest events in memory and also writes each response body to a private file, readable only by you, in its storage folder. The file is deleted when its run leaves the history, when VS Code closes, or at the next start after a crash. Secrets you enter stay in VS Code's secret storage.
Security
- Streamscope masks credentials wherever it describes a request, a response or a captured value: in the log, notifications, hovers, the Headers view, captured values, the Testing view, history and errors. It masks:
- credential headers in requests and responses, meaning any header whose name contains a word such as
auth,authorization,token,key,secret,password,session,cookieorsignature. These includeAuthorization,Proxy-Authorization,Cookie,Set-CookieandX-Api-Key; - user info in URLs;
{{$secret …}}values andsecretcaptures;- the values of variables whose names contain
token,bearer,apikey,secretorpassword, such asapiToken.
- credential headers in requests and responses, meaning any header whose name contains a word such as
- A credential typed into a URL query string is not masked. A
{{$secret …}}value in the URL is. - Response bodies, events and raw data are shown and saved as received.
- Redirects to another origin drop
Host, credential headers and any header that contains one of the masked values. A 307 or 308 redirect that would resend the request body to another origin, or from https to http, stops the request instead. - TLS verification stays on unless you turn it off for one request (
# @insecure) or one environment. - Body files must be inside the workspace folder, and a captured value or response can never choose which file is sent.
- The response panel runs with a strict content security policy and shows response data as text only.
Report a vulnerability privately as described in SECURITY.md.
Restricted workspaces
In a workspace you have not trusted, Streamscope still highlights, outlines and checks .http files, and asks once per session before it sends a request. In such a workspace it:
- does not read secrets,
.envfiles,http-client.private.env.json, environments from your user settings, process variables or body files; - ignores
# @insecureand environment TLS opt-outs; - uses
streamscope.request.caFileonly from your own settings, and only when it is an absolute path; - does not run files from the Testing view.
When you trust the workspace, later requests stop using the values captured and the responses received before that, so run those requests again.
Accessibility
The response panel works from the keyboard alone: arrow keys move between its views and through the event list, and Enter expands an event. Its tabs, event list and live status use the roles screen readers expect, and it follows VS Code's colour themes, including both high-contrast themes. Accessibility lists every key and what screen readers announce.
Requirements
VS Code 1.101 or later, desktop only, on macOS, Windows or Linux.
Feedback
Report bugs in GitHub issues, with made-up hosts, ids and values in place of real tokens and URLs. The source code is at github.com/achrafelkhnissi/streamscope.

