http_request
Fetch authenticated URLs using browser session cookies, returning text inline or saving binary files like PDFs to a path.
Instructions
HTTP request sent from the browser, so it carries the session cookies of the logged-in user: fetches URLs a plain server-side request would get a login page for (invoices, authenticated JSON, CSV exports). Text bodies are returned inline (capped by max_length); with save_to the bytes are written to that path instead, which is how you read a PDF — Chrome renders PDFs in a viewer no content script can reach, so read_page returns nothing on a PDF tab.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Absolute URL. Cookies are sent for its origin | |
| body | No | Request body (POST/PUT/PATCH) | |
| method | No | HEAD fetches headers only, without the body | GET |
| headers | No | Extra request headers | |
| save_to | No | Absolute path: write the response bytes here instead of returning them (PDF, images, archives) | |
| max_length | No | Max chars of body returned inline |