Requests
Restish supports two request styles: generic HTTP requests for immediate access and API-aware commands generated from an API description for repeated work.
Start With A Generic Request
Use generic requests when you are exploring, debugging, or calling an endpoint
that has no useful spec. A bare target sends GET when there is no body and
POST when shorthand arguments or stdin provide a body.
Once a request becomes part of your normal workflow, register the API when it has a useful OpenAPI description. Generated commands give the same request pipeline a steadier name, examples, completion, profiles, and auth behavior.
Add Headers And Query Params
The /anything fixture echoes method, path, query, headers, raw body, and
parsed body so you can inspect the exact request shape.
Use quoted URLs when you include query strings directly:
Send Request Bodies
For small structured bodies, use shorthand:
Separate multiple shorthand fields with commas, even when the shell splits the
body over several words or lines. Without commas, later key: text remains part
of the previous value.
For generated or larger bodies, pipe stdin:
echo '{"name":"Alice","role":"user"}' | restish api.rest.sh/post
Piped structured input can be patched by shorthand arguments:
echo '{"name":"Alice","role":"user"}' | restish api.rest.sh/post 'role: admin'
Use API-Aware Commands
Register an API when repeated work deserves generated help and completion:
restish api connect example api.rest.sh 'prompt.api_key: docs-key'
restish example list-images
restish example get-image jpeg > dragonfly.jpg
Generated commands still support normal request flags:
Override The Server Temporarily
Use --rsh-server when a generated command should hit a different host for one
invocation:
restish --rsh-server https://staging.example.com example list-images
If you keep using the override, create a profile instead.
Debug A Request
Verbose output goes to stderr so stdout can remain useful for response data.
Use /anything or /headers when you need the server to echo what it received.