StrikekitStrikekit

api post

HTTP POST with optional body, body file, or multipart form queue

Issue an HTTP POST. Optional JSON/text body inline or from a file beside the .stk. With a pending form queue (fields/files), a bare path sends multipart/form-data.

Syntax

When I api post "<path>"
When I api post "<path>" with body '<json-or-text>'
When I api post "<path>" with body file "<filename>"

Prefer single quotes around JSON bodies so inner " do not need escaping.

Qualifiers

QualifierRoleExample
with bodyInline request bodywith body '{"item":"book"}'
with body fileBody from file beside .stk (or files/)with body file "create-order.json"

Examples

When I api post "/orders" with body '{"item":"book"}'
When I api post "/orders" with body file "create-order.json"

Multipart (prepare then send):

When I api set fields to '{"name":"Invoice"}'
When I api set file "main" to "invoice.pdf"
When I api post "/upload"

Notes

  • If the form queue is non-empty, bare api post sends multipart and clears the queue.
  • Do not combine a pending form queue with with body / with body file.
  • with body file is raw file bytes as the request body (usually JSON text) — not multipart upload. Use api set file for files.

On this page