http_read
Gate: gated
on net, target the host of the URL, e.g. api.github.com
· read
Read a URL with a safe method. Every call asks — a read over the network is still a reach off the machine, so http_read is gated exactly like http_write. What you approve is the host, and the answer covers the other net tools for that host too. Reach, credentials and leak scanning all live on the net kind.
Input
| Field | Type | Required | Notes |
|---|---|---|---|
url | string | yes | The URL to read. |
method | string | no | GET or HEAD. Default GET. A mutating method is rejected. |
Output
A JSON envelope — the real outcome, not just the body:
{ "status": 200, "statusText": "OK", "headers": { "Content-Type": "application/json" }, "body": "…" }The body is capped at 64 KiB; anything beyond that is dropped rather than truncating your context silently elsewhere.
From JavaScript
const r = await fetch("https://api.example.com/items");const items = await r.json();const res = JSON.parse(nocturn.call("http_read", { url: "https://api.example.com/items" }));Notes
Request headers other than Content-Type are not forwarded — the host owns the credential channel and injects auth at the boundary. Each redirect hop is gated again against its new host.