>_ RESTERM
v1.18.2

examples Scripts and checks

rts/apply_profiles.http

Reusable @patch profiles applied with @apply use=.

runs as-is

shell
resterm run _examples/rts/apply_profiles.http

Run this from the root of a clone of the Resterm repository.

Editor
# @global base_url https://httpbin.org

# @patch file jsonApi {headers: {"Accept":"application/json","Content-Type":"application/json"}}
# @patch file strict {settings: {timeout:"3s", followredirects:false}}
# @patch global authDemo {auth: {type:"bearer", token:"demo-token"}}

### Reusable apply profiles
# @name RTS_ApplyProfiles
# @apply use=jsonApi,use=authDemo,use=strict
# @assert request.header("Accept") == "application/json"
# @assert response.json("headers.Authorization") == "Bearer demo-token"
POST {{base_url}}/anything

{"hello":"world"}

_examples/rts/apply_profiles.http on GitHub

@patch docs
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 page
g d
Docs index
g h
Home page
t
Switch between dark and light
?
Show this help
Esc
Close a dialog