Agent Skills
› espressif/esp-claw
› cap_http_request
cap_http_request
GitHub用于向白名单内的 HTTP/HTTPS 端点发起请求,返回状态码和响应体文本,或直接将响应流式保存至文件。适用于已知目标地址且需受控访问的场景。
Trigger Scenarios
需要从特定 URL 获取原始 API 数据或文件内容
工作流已知目标端点且需要执行受白名单保护的抓取操作
Install
npx skills add espressif/esp-claw --skill cap_http_request -g -y
SKILL.md
Frontmatter
{
"name": "cap_http_request",
"metadata": {
"cap_groups": [
"cap_http_request"
],
"manage_mode": "readonly"
},
"description": "Call allowlisted HTTP or HTTPS endpoints directly and return response status plus body text, or stream the response body to a file."
}
HTTP Request
Use this skill when the task needs a direct HTTP or HTTPS request to a known endpoint instead of search-engine results.
When to use
- The user needs raw API or file content from a specific URL.
- A workflow already knows the target endpoint and only needs a guarded fetch.
- The request should stay inside the device allowlist policy.
Available capability
http_request: send standard HTTP requests to allowlisted domains or IPs and return status plus body text, or save the response body directly to a file.
Calling rules
- Only call
http_requestwhen the target host is expected to be in the configured allowlist. - Input must be a JSON object:
{
"url": "https://api.example.com/v1/data",
"method": "GET",
"headers": {
"Authorization": "Bearer <token>"
},
"body": "",
"timeout_ms": 15000,
"max_body_bytes": 16384,
"save_path": "/spiffs/download.bin",
"max_file_bytes": 1048576
}
urlis required and must start withhttp://orhttps://.methoddefaults toGET.bodyis only valid for methods that accept a request body.save_pathis optional. When present, the response body is streamed directly to this file and is not returned in memory.max_body_bytesapplies only when returning the response body as text.max_file_bytesis optional and applies only whensave_pathis present.- Redirects are allowed only when the redirect target also matches the allowlist.
Output shape
- The capability returns plain text, not JSON.
- Success format:
HTTP <status>- followed by the response body text
- File-save success format:
HTTP <status>Saved response body to <path> (<bytes> bytes)
- Common error strings include:
Error: HTTP allowlist is empty; configure search_http_allowlist firstError: host '...' is not in allowlistError: method must be GET/POST/PUT/PATCH/DELETE/HEADError: save_path must be a non-empty stringError: failed to open save_pathError: http request failed (...)
Examples
{
"url": "https://skills-lab.esp-claw.com/raw/tags.json"
}
{
"url": "https://api.example.com/v1/items",
"method": "POST",
"headers": {
"Content-Type": "application/json"
},
"body": "{\"name\":\"demo\"}"
}
{
"url": "https://example.com/file.bin",
"save_path": "/spiffs/file.bin",
"max_file_bytes": 10485760
}
Version History
- 06eb576 Current 2026-07-24 19:53


