Add a body to a request by placingDocumentation Index
Fetch the complete documentation index at: https://docs.getpostchi.com/llms.txt
Use this file to discover all available pages before exploring further.
@body on its own line. Everything after @body is sent as the request body.
Content-Type header when present, or by inspecting the body text when it isn’t.
JSON body
Postchi treats the body as JSON when:Content-Type: application/jsonis set, or- the body starts with
{or[
"<username>" with the resolved value and keeps the surrounding quotes so the JSON stays valid.
Form body (URL-encoded)
Postchi treats the body as URL-encoded form data when:Content-Type: application/x-www-form-urlencodedis set, or- the body uses
key=valuepairs
Multipart form body (file uploads)
UseContent-Type: multipart/form-data together with readFile() to attach binary files:
readFile(path) reads the file from disk and attaches it as a binary form part. If you don’t set Content-Type explicitly, Postchi automatically switches to multipart/form-data when it encounters a readFile() call in the body.
readFile() is only valid inside a form body. To inline a text file as the entire body, use readText() instead.Plain text and other content types
AnyContent-Type that isn’t JSON or form-encoded is sent as a plain text body:
Loading the body from a file
For large bodies, keep the content in a separate file and usereadText(path) to load it at run time:
Variables in bodies
Variables (<variable_name>) work in all body types:
- JSON
- Form
- Plain text