readfetch_fetch
Send an HTTP request (GET, POST, PUT, PATCH, DELETE, HEAD) through egress and return status_code, response headers, and body as text or base64 (binary: true). max_bytes caps the stored body; follow_redirects (default true) and timeout_s (95 s ceiling) apply to the full redirect chain. Use json_body for JSON POST/PUT payloads; use body for raw bytes or strings. Prefer readfetch_text for readable HTML articles; readfetch_pdf to extract PDF text (not raw bytes alone). POST/PUT/DELETE can change remote state despite readOnlyHint.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Request URL (http or https). | |
| body | No | Raw request body string for POST/PUT/PATCH (mutually exclusive with json_body). | |
| binary | No | When true, return body as base64 instead of UTF-8 text. | |
| method | No | HTTP method (GET default). | GET |
| headers | No | Optional request headers, e.g. Authorization or Accept. | |
| json_body | No | JSON object serialized as the request body (Content-Type application/json). | |
| max_bytes | No | Stop reading and truncate once the response body exceeds this size (bytes). | |
| timeout_s | No | Total budget for the whole call in seconds, redirect hops included. | |
| follow_redirects | No | Follow 3xx redirects (default true). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | ||
| size | No | ||
| text | No | ||
| status | No | ||
| status_code | No | ||
| content_type | No |