HTTP Request
http_requestMake raw HTTP requests to any REST/JSON API and retrieve status, headers, and body. Supports GET, POST, PUT, PATCH, DELETE with custom headers or body.
Instructions
Make a raw HTTP request to any API and return status, headers and body. Use for REST/JSON APIs that need GET/POST/PUT/DELETE with custom headers or a body.
Args:
url (string): Target URL.
method ('GET'|'POST'|'PUT'|'PATCH'|'DELETE'): default 'GET'.
headers (object): Optional header map, e.g. { "Authorization": "Bearer ..." }.
body (string): Optional request body (send JSON as a stringified object).
Returns { status, statusText, headers, body }.
Example: { "url": "https://api.github.com/repos/nodejs/node", "headers": { "Accept": "application/vnd.github+json" } }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Target URL | |
| method | No | HTTP method | GET |
| headers | No | Optional request headers | |
| body | No | Optional request body |