What's new
Resterm Script (Experimental) - a small, safe expression language for request-time logic in .http/.rest files.
- Experimental RTS expression language for templates, directives, and .rts modules with bounded execution (no network or file writes. Optional json.file reads).
- Request‑level directives:
@use, @apply, @when/@skip-if, @assert, @for-eachand@script pre-request lang=rts. - Workflow‑only branching directives:
@if/@elif/@elseand@switch/@case/@default(use@when/@skip-iffor simple request). - Pre‑request RTS scripts can mutate request/vars before execution -
@applyruns first. JavaScript pre‑request scripts remain supported. - RTS runtime context + stdlib: env, vars, request, last, response, trace, stream, plus core/encoding/URL/time/JSON/text/list/dict/math helpers.
- New reference in docs/restermscript.md, sample pack in _examples/rts plus editor syntax highlighting and metadata hints.
There are only experimental features so no breaking changes in this release!
Example of new RestermScript:
# @use ./rts/helpers.rts as helpers
# @when vars.has("api.token")
# @assert response.statusCode == 200
GET {{base_url}}/bearer
Authorization: {{= helpers.authHeader(vars.get("api.token")) }}