Expand description
API block — HTTP request via reqwest. Honors {{...}} interpolation
in url, headers, and body.
Config (node.data):
method— “GET” / “POST” / “PUT” / “DELETE” / “PATCH” (default GET)url— required; supports{{...}}headers— optional{ name: value }map; values support{{...}}body— optional string body (POST/PUT/PATCH); supports{{...}}
Output:
{ "status": 200, "body": <parsed-json-or-text>, "headers": { ... } }Constants§
Statics§
- HTTP_
CLIENT 🔒 - Shared
reqwest::Clientso drones with multiple API blocks reuse one connection pool instead of building a new pool per request. Per-request timeouts move to the RequestBuilder. (reagent P2 on PR #755.)
Functions§
- http_
client 🔒 - is_
reserved_ 🔒v4 - is_
reserved_ 🔒v6 - run
- validate_
url_ 🔒for_ safety - Same checks as
validate_url_safetybut takes a pre-parsedreqwest::Url. The redirect-policy closure receives Url values directly, so this avoids a parse round-trip on every hop. - validate_
url_ 🔒safety - Validate a resolved URL before dispatching it. Phase 1 SSRF
protection: rejects non-http(s) schemes and literal-IP hosts that
fall into reserved / link-local / private / loopback ranges (the
AWS metadata endpoint 169.254.169.254, RFC1918 space, 127.0.0.1,
fc00::/7, ::1, etc.). DNS-resolved hostnames are not re-checked
post-resolution — that requires a custom
reqwestresolver and lands as a follow-up issue. See kimi P1 on PR #755.