examples Scripts and checks
rts/apply_profiles.http
Reusable @patch profiles applied with @apply use=.
runs as-is
resterm run _examples/rts/apply_profiles.httpRun this from the root of a clone of the Resterm repository.
Editor
@patch docs# @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"}