@zack/http-fetch
Make HTTP requests (GET/POST/etc.) and return normalized response metadata and content.
Get started
Install, run, or load this Tool.
01Install
Resolve this exact Tool version and its prepared dependencies.
agentpm install @zack/http-fetch@0.1.102Run Tool
Send JSON to its declared input contract and receive JSON output.
agentpm run @zack/http-fetch@0.1.1 --input-file input.jsonSupply input.json matching this Tool’s input schema.
ORLoad via SDK
Call the installed Tool through an SDK.
import { load } from '@agentpm/sdk';
const t = await load('@zack/http-fetch@0.1.1');CLI version & updates
CLI 0.1.36+ reads and preserves standard declarations. New publications require an explicit supported standard; use the latest CLI for current authoring checks. Historical releases remain installable as published. This floor does not establish selected-release installation support or Harness readiness.
Check agentpm --version, then follow the CLI installation and update guide. See the publication compatibility requirements.
Interface
The contract a caller must satisfy, from the authored JSON Schema.
Input
urlstringrequiredThe URL to request.
- format:
- "uri"
bodystringoptionalOptional request body (for POST/PUT/PATCH, etc.). Sent as-is. For JSON, send a JSON-stringified payload and set Content-Type accordingly.
methodstringoptionalHTTP method to use.
- enum:
- ["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS"]
- default:
- "GET"
headersobjectoptionalOptional request headers as a simple key/value map.
- additionalProperties:
- {"type":"string"}
max_bytesintegeroptionalMaximum number of bytes to read from the response body. Responses larger than this should be truncated.
- default:
- 1048576
- minimum:
- 1
- maximum:
- 5242880
timeout_msintegeroptionalRequest timeout in milliseconds.
- default:
- 30000
- minimum:
- 1
- maximum:
- 120000
response_typestringoptionalHint for how the response body should be returned.
- enum:
- ["auto","text","json","bytes"]
- default:
- "auto"
follow_redirectsbooleanoptionalWhether to follow HTTP redirects.
- default:
- true
No other input fields are accepted.
Complete input schema
{
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"type": "string",
"format": "uri",
"description": "The URL to request."
},
"body": {
"type": "string",
"description": "Optional request body (for POST/PUT/PATCH, etc.). Sent as-is. For JSON, send a JSON-stringified payload and set Content-Type accordingly."
},
"method": {
"enum": [
"GET",
"POST",
"PUT",
"DELETE",
"PATCH",
"HEAD",
"OPTIONS"
],
"type": "string",
"default": "GET",
"description": "HTTP method to use."
},
"headers": {
"type": "object",
"description": "Optional request headers as a simple key/value map.",
"additionalProperties": {
"type": "string"
}
},
"max_bytes": {
"type": "integer",
"default": 1048576,
"maximum": 5242880,
"minimum": 1,
"description": "Maximum number of bytes to read from the response body. Responses larger than this should be truncated."
},
"timeout_ms": {
"type": "integer",
"default": 30000,
"maximum": 120000,
"minimum": 1,
"description": "Request timeout in milliseconds."
},
"response_type": {
"enum": [
"auto",
"text",
"json",
"bytes"
],
"type": "string",
"default": "auto",
"description": "Hint for how the response body should be returned."
},
"follow_redirects": {
"type": "boolean",
"default": true,
"description": "Whether to follow HTTP redirects."
}
},
"additionalProperties": false
}Output
Variant 1
oktruestatusintegerHTTP status code returned by the server.
headersobjectNormalized response headers as a key/value map.
- additionalProperties:
- {"type":"string"}
body_jsonobjectParsed JSON response body when response_type=json (or auto detects JSON).
body_textstringUTF-8 text response body when treatable as text (response_type=text or auto-detected).
truncatedbooleanTrue if the response body was truncated due to max_bytes.
url_finalstringFinal URL after redirects (if follow_redirects is true).
body_base64stringBase64-encoded response body for binary responses (response_type=bytes or auto detects binary).
status_textstringHTTP status text, if available.
content_typestringContent-Type header value, if present.
Variant 2
okfalseerrorobject- additionalProperties:
- true
Inspect error structure
codestringoptionalStable machine-readable error code (e.g. INPUT_INVALID, REQUEST_FAILED, TIMEOUT, RESPONSE_TOO_LARGE).
detailsobjectoptionalOptional structured context about the error (e.g. status code, URL).
- additionalProperties:
- true
messagestringrequiredHuman-readable error message.
Complete output schema
{
"oneOf": [
{
"type": "object",
"required": [
"ok",
"status",
"headers"
],
"properties": {
"ok": {
"const": true
},
"status": {
"type": "integer",
"description": "HTTP status code returned by the server."
},
"headers": {
"type": "object",
"description": "Normalized response headers as a key/value map.",
"additionalProperties": {
"type": "string"
}
},
"body_json": {
"type": "object",
"description": "Parsed JSON response body when response_type=json (or auto detects JSON)."
},
"body_text": {
"type": "string",
"description": "UTF-8 text response body when treatable as text (response_type=text or auto-detected)."
},
"truncated": {
"type": "boolean",
"description": "True if the response body was truncated due to max_bytes."
},
"url_final": {
"type": "string",
"description": "Final URL after redirects (if follow_redirects is true)."
},
"body_base64": {
"type": "string",
"description": "Base64-encoded response body for binary responses (response_type=bytes or auto detects binary)."
},
"status_text": {
"type": "string",
"description": "HTTP status text, if available."
},
"content_type": {
"type": "string",
"description": "Content-Type header value, if present."
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"ok",
"error"
],
"properties": {
"ok": {
"const": false
},
"error": {
"type": "object",
"required": [
"message"
],
"properties": {
"code": {
"type": "string",
"description": "Stable machine-readable error code (e.g. INPUT_INVALID, REQUEST_FAILED, TIMEOUT, RESPONSE_TOO_LARGE)."
},
"details": {
"type": "object",
"description": "Optional structured context about the error (e.g. status code, URL).",
"additionalProperties": true
},
"message": {
"type": "string",
"description": "Human-readable error message."
}
},
"additionalProperties": true
}
},
"additionalProperties": false
}
]
}Runtime & execution
What AgentPM provisions and runs on your machine.
- Runtime
- node 20
- Entrypoint
- node dist/index.js
- Timeout
- 60 s
- Packaged files
- 1
Environment
HTTP_FETCH_PROXY_URLOptionalHTTP_FETCH_DEFAULT_USER_AGENTOptionalDeclared by the author and read from your environment at run time. AgentPM neither supplies nor proxies credentials. Local runtime readiness is not evaluated here.
Evidence
Health & Security →Reported by the Registry, for this version. A Registry-performed check is a Registry-reported result, not independent verification.
- APDS conformance
- Legacy inference; conformance not established
- Integrity & provenance
4 recorded signals
- Not applicable: Logical release digestRegistry recomputed metadata binding; archive bytes are not re-downloaded. Historical single archives have no logical release digest.Source: canonical release document and stored manifest/resolution/artifact inventory. Observed .
- Author signature verified by RegistryRegistry namespace signer history; Ed25519 and exact statement binding. This is a Registry-performed check, not independent local verification by the reader or a safety guarantee.Source: stored provenance and Stage 1 verification contracts. Observed .
- Registry attestation verified by RegistryRoot-signed Registry key set; exact origin, validity, key history and Ed25519 statement binding. This is a Registry-performed check, not independent local verification by the reader or a safety guarantee.Source: stored provenance and Stage 1 verification contracts. Observed .
- Not evaluated: Dependency byte integrity not evaluatedUse a local verified installation to check the exact graph's downloaded bytes.Source: Registry metadata only. Observed .
- Target support
- 1 artifact · legacy · provisioning not evaluated
- License
- MIT · declared by the author
Source
Legacy manifest: no explicit APDS declaration. Compatibility may be inferred; this is not verified conformance.
Full agent.json · v0.1.1
{
"kind": "tool",
"name": "http-fetch",
"files": [
"dist/"
],
"inputs": {
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"type": "string",
"format": "uri",
"description": "The URL to request."
},
"body": {
"type": "string",
"description": "Optional request body (for POST/PUT/PATCH, etc.). Sent as-is. For JSON, send a JSON-stringified payload and set Content-Type accordingly."
},
"method": {
"enum": [
"GET",
"POST",
"PUT",
"DELETE",
"PATCH",
"HEAD",
"OPTIONS"
],
"type": "string",
"default": "GET",
"description": "HTTP method to use."
},
"headers": {
"type": "object",
"description": "Optional request headers as a simple key/value map.",
"additionalProperties": {
"type": "string"
}
},
"max_bytes": {
"type": "integer",
"default": 1048576,
"maximum": 5242880,
"minimum": 1,
"description": "Maximum number of bytes to read from the response body. Responses larger than this should be truncated."
},
"timeout_ms": {
"type": "integer",
"default": 30000,
"maximum": 120000,
"minimum": 1,
"description": "Request timeout in milliseconds."
},
"response_type": {
"enum": [
"auto",
"text",
"json",
"bytes"
],
"type": "string",
"default": "auto",
"description": "Hint for how the response body should be returned."
},
"follow_redirects": {
"type": "boolean",
"default": true,
"description": "Whether to follow HTTP redirects."
}
},
"additionalProperties": false
},
"$schema": "https://raw.githubusercontent.com/agentpm-dev/cli/refs/heads/main/schemas/agentpm.manifest.schema.json",
"license": {
"file": "LICENSE",
"spdx": "MIT"
},
"outputs": {
"oneOf": [
{
"type": "object",
"required": [
"ok",
"status",
"headers"
],
"properties": {
"ok": {
"const": true
},
"status": {
"type": "integer",
"description": "HTTP status code returned by the server."
},
"headers": {
"type": "object",
"description": "Normalized response headers as a key/value map.",
"additionalProperties": {
"type": "string"
}
},
"body_json": {
"type": "object",
"description": "Parsed JSON response body when response_type=json (or auto detects JSON)."
},
"body_text": {
"type": "string",
"description": "UTF-8 text response body when treatable as text (response_type=text or auto-detected)."
},
"truncated": {
"type": "boolean",
"description": "True if the response body was truncated due to max_bytes."
},
"url_final": {
"type": "string",
"description": "Final URL after redirects (if follow_redirects is true)."
},
"body_base64": {
"type": "string",
"description": "Base64-encoded response body for binary responses (response_type=bytes or auto detects binary)."
},
"status_text": {
"type": "string",
"description": "HTTP status text, if available."
},
"content_type": {
"type": "string",
"description": "Content-Type header value, if present."
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"ok",
"error"
],
"properties": {
"ok": {
"const": false
},
"error": {
"type": "object",
"required": [
"message"
],
"properties": {
"code": {
"type": "string",
"description": "Stable machine-readable error code (e.g. INPUT_INVALID, REQUEST_FAILED, TIMEOUT, RESPONSE_TOO_LARGE)."
},
"details": {
"type": "object",
"description": "Optional structured context about the error (e.g. status code, URL).",
"additionalProperties": true
},
"message": {
"type": "string",
"description": "Human-readable error message."
}
},
"additionalProperties": true
}
},
"additionalProperties": false
}
]
},
"runtime": {
"type": "node",
"version": "20"
},
"version": "0.1.1",
"entrypoint": {
"args": [
"dist/index.js"
],
"command": "node",
"timeout_ms": 60000
},
"description": "Make HTTP requests (GET/POST/etc.) and return normalized response metadata and content.",
"environment": {
"vars": {
"HTTP_FETCH_PROXY_URL": {
"required": false,
"description": "Optional HTTP(S) proxy URL to route requests through."
},
"HTTP_FETCH_DEFAULT_USER_AGENT": {
"required": false,
"description": "Optional default User-Agent header to send when none is provided in inputs."
}
}
}
}