Post JSON From a File
Send a JSON request body from stdin.
Use a file when the request body is too large or too important to type as shorthand on the command line. Restish reads stdin, decodes the structured document, and sends it as the request body.
restish post api.rest.sh/post < payload.json
Example payload.json:
{"name":"Alice","enabled":true}
The /post fixture echoes the parsed body so you can verify what was sent.
Variant with explicit content type:
restish post -c json api.rest.sh/post < payload.json
The explicit -c json form is useful when stdin comes from a source without a
clear extension or when a script should make the request encoding obvious. For
small bodies, shorthand is usually faster.
Related: Input and Shorthand.