the standard library
nika:fetch
HTTP request + content extraction · returns the extracted body (non-2xx is an error). SSRF-defended. One of 28 builtins in the closed nika: namespace: network egress (permits.net-gated).
- networkfamily2 tools
- 10argsdeclared contract
- 0requiredall optional
- 4skeletonsship this tool
the contract
10 args · 0 requiredA missing required arg is a nika check finding before anything runs; the vocabulary below comes from the binary itself (nika catalog --tools --json), not from prose.
- url
stringthe URL- method
stringGET (default) | POST | PUT | DELETE | PATCH | HEAD- headers
objectstring map · auth rides here: { x-api-key: "${{ secrets.KEY }}" }- body
- request body (objects auto-JSON) · at most one of body/form/multipart
- form
objectapplication/x-www-form-urlencoded scalar fields · POST/PUT/PATCH only- multipart
arraymultipart/form-data parts · {name, value} text or {name, path, filename?, content_type?} file (path is permits.fs.read-gated · ≤32 MiB total) · POST/PUT/PATCH only- traverse
objectbounded same-origin crawl · { max_pages: 1..=25 (required), respect_robots?: bool (default true) } · GET only · excludes mode/selector/jq/body/form/multipart · emits { url, page_count, pages[], assets } page digests- mode
stringmarkdown (default) | article | text | selector | jq | metadata | links | feed | sitemap | raw- selector
stringCSS selector (mode: selector only)- jq
stringa jq expression (mode: jq only · the one data language)
in a real file
from the gate-and-act skeleton check: invoke: tool: "nika:fetch" args: url: "${{ const.source_url }}" mode: jq jq: "." output: value: ".value" # SLOT: the jq path to the watched field on_error: # Offline rehearsal · a sample UNDER the threshold — the gate stays # closed, the skeleton runs green before you wire the real source. recover: { value: 42 }a verbatim excerpt, real line numbers from gate-and-act.nika.yaml, conformance-gated upstream on every spec push. open the full skeleton →
cross-references
ships in skeletons
the check gates
Structure, not just bytes.
9 modesEach mode is a named contract with a defined output shape · the full teaching lives in stdlib · extract modes ↗.
Machines read the same vocabulary at /tools/catalog.json; the contract lives in spec 06 · stdlib. Install and ask the binary itself: nika catalog --tools. Read the spec →