>_ RESTERM
v1.18.1
examples.md

docs Reference

Examples

Ready-to-run request files in the _examples directory.

The _examples/ directory has request files you can run right away:

  • basic.http - simple GET/POST with bearer auth.
  • nested.http - requests with nested JSON bodies and tags.
  • service-groups.http - requests grouped by tag, such as smoke checks and provisioning.
  • scopes.http - global, file, and request captures.
  • scripts.http - a RestermScript pre-request block that sets a token, headers, and body, then an @assert check.
  • javascript.http - JavaScript pre-request and test scripts, and a test that saves a response body to a file.
  • xml.http - XML bodies and explicit inline angle-prefixed text.
  • transport.http - timeout, proxy, and @no-log samples.
  • auth_scopes.http - default auth inheritance across global/file/request scopes plus @auth none.
  • auth_command.http - command-backed auth with file-scoped defaults, named definitions with use=, gh auth token, patch-based reuse, JSON output parsing, and custom header examples.
  • oauth2.http - capturing a token by hand compared with the @auth oauth2 directive.
  • graphql.http - inline and file-based GraphQL requests, with queries and variables in queries/.
  • grpc.http - gRPC reflection and descriptor usage, with a descriptor set in descriptors/.
  • streaming.http - an SSE feed and a WebSocket chat in one file.
  • sse_manual.http and sse_scripted.http - an SSE feed to watch in the Stream tab, and one checked by captures and @assert.
  • websocket_manual.http and websocket_scripted.http - a WebSocket echo to drive from the console, and one driven by @ws steps and checked by @assert and an @rts test block.
  • workflows.http - a full workflow with captures, overrides, and expectations.
  • polling-retries.http - polling and retries against mock sequences in the same file.
  • compare.http - @compare directives and multi-environment sweeps started from the CLI.
  • trace.http - one request within its trace budget and one that breaches it.
  • mocks.http - mock routes, variants, matchers, selectors, latency, and fixture bodies, such as mock-user.json.
  • recording.http - a local walkthrough of resterm record against a mock server.
  • ssh.http - SSH jump profiles and per-request overrides.
  • k8s.http - Kubernetes profile scopes, non-pod targets, named ports, and gRPC over @k8s.
  • curl-import.http - sample output from the CLI curl importer.
  • openapi-spec.yml - an OpenAPI document to try the OpenAPI importer on.
  • resterm.env.json - the environments the examples above use.

Folders:

  • grouped/ - grouped environments, with a mock backend that echoes what each request carried.
  • rts/ - RestermScript modules, @apply profiles, loops, and pre-request and test blocks.
  • js/ - the script that javascript.http includes to save a downloaded image.
  • bindings/ - a sample bindings.toml. See Key bindings.
  • themes/ - the Aurora and Daybreak themes. See Theming.

Open one in Resterm, pick the right environment from resterm.env.json, and send the requests to see how each feature works.

Search

↑↓ moveEnter openEsc close

Help

These keys work like the ones in the TUI.

/
Search the docs (also Ctrl K)
j k
Scroll down and up
g g G
Jump to the top or the bottom
[ ]
Previous and next docs page
g d
Docs index
g h
Home page
t
Switch between dark and light
?
Show this help
Esc
Close a dialog