Requests

Build Restish requests with generic HTTP verbs, generated API commands, headers, query params, bodies, and profiles.

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

Browser preview

Edit the command and run it from your browser against the live docs API.

Ready
Browser preview

Edit the command and run it from your browser against the live docs API.

Ready

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

Browser preview

Edit the command and run it from your browser against the live docs API.

Ready

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:

Browser preview

Edit the command and run it from your browser against the live docs API.

Ready

Send Request Bodies

For small structured bodies, use shorthand:

Browser preview

Edit the command and run it from your browser against the live docs API.

Ready

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.

Browser preview

Edit the command and run it from your browser against the live docs API.

Ready

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:

Browser preview

Edit the command and run it from your browser against the live docs API.

Ready

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

Browser preview

Edit the command and run it from your browser against the live docs API.

Ready

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.