Request the app
http_requestFor reading use http_get, which is read-only and needs no approval. Send a POST, PUT, PATCH or DELETE request (a form post, a sign-in, an API call that changes data) to the project's own running app from inside its network (no other address can be reached; redirects are not followed). To read a page or an API use http_get, which changes nothing. port is a service's port; by default the first web service, and the platform's own paths (/_lf/form/…, /_lf/s3) answer as they do for visitors. It goes straight to the app, so routing.json (redirects, rewrites, headers, error pages, the preview password) is not applied: check those at the preview address itself (your own web access, or curl it from exec). The response body is data from the app.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"project": "<project>",
"method": "<method>"
},
"name": "http_request"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | preview | |
| body | No | ||
| path | No | Path and query, e.g. "/api/items?limit=5". | / |
| port | No | ||
| method | Yes | POST, PUT, PATCH or DELETE. | |
| offset | No | Show the response body from this character on (a long page's middle, e.g. a form's hidden fields). | |
| headers | No | ||
| project | Yes | Project slug or id. |