一键导入
http-request
Make HTTP/REST requests with auth, custom headers, query/body, pagination, retries with backoff, and structured error handling.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Make HTTP/REST requests with auth, custom headers, query/body, pagination, retries with backoff, and structured error handling.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Read, filter, select, aggregate, and join CSV / tabular data without spinning up a full data stack.
jq-style select, filter, and reshape over JSON and YAML — extract paths, map arrays, and filter records without writing throwaway code.
Write a dataset (array of records) to CSV, JSON, XLSX, or PDF through one interface — format chosen by the output extension.
Read, write, search, and edit files in the workspace safely — atomic writes, exact-match edits, and recursive content search.
Everyday git — clone, branch, stage, diff, commit, and push, with a safe, predictable workflow.
Connect to a Model Context Protocol (MCP) server, perform the handshake, discover its tools, and invoke them over JSON-RPC.
| name | http-request |
| description | Make HTTP/REST requests with auth, custom headers, query/body, pagination, retries with backoff, and structured error handling. |
| version | 0.1.0 |
Talk to HTTP/REST APIs reliably. Use this whenever you need to call a web service — fetch JSON, POST a payload, page through a list, or hit an authenticated endpoint.
A ready-made helper lives at scripts/request.py (stdlib urllib only — no
install needed). For richer needs you may use the requests library instead;
if you do, tell the runner to pip install requests first.
Authorization: Bearer <token>X-API-Key: <key>) or a query param —
check the docs.Authorization: Basic <base64(user:pass)>.
Never hardcode secrets — read them from environment variables.Content-Type: application/json. For form data, URL-encode it and set
application/x-www-form-urlencoded.Content-Type says so). For 4xx/5xx, surface the status and
the response body — the error detail is almost always in the body.Retry-After header when
present.Link header with rel="next" (GitHub-style), ornext cursor/URL field in the JSON body, or# Simple GET, pretty JSON to stdout
python scripts/request.py GET https://api.example.com/v1/things
# Authenticated POST with a JSON body and retries
python scripts/request.py POST https://api.example.com/v1/things \
--header "Authorization: Bearer $API_TOKEN" \
--json '{"name": "widget"}' \
--retries 3
# Add query params and follow Link-header / cursor pagination
python scripts/request.py GET https://api.example.com/v1/things \
--query "per_page=100" --paginate --max-pages 20
The helper prints the parsed JSON (or raw text) to stdout and exits non-zero on an unrecoverable HTTP error, with the status and body on stderr — so you can branch on the exit code.