关于 http-client
http-client 是用于发送 HTTP 请求的技能,适合调用 API 和测试端点。它支持常见请求方法、请求头、身份验证和文件上传。
主要功能
- 01发送 GET、POST、PUT 和 DELETE 请求
- 02设置请求头
- 03提供身份验证
- 04上传文件
适用场景
- 01调用 API 端点
- 02测试 HTTP 端点
- 03在 POST 请求中发送 JSON
- 04使用授权请求头发起请求
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ aidotnet/ moyucode --skill http-client安装后在 Claude Code 中输入/http-client确认已加载。
附带文件scripts/http_client.py
详细介绍
HTTP 客户端工具
描述
发起 HTTP 请求,全面支持 GET、POST、PUT、DELETE、请求头、身份验证和文件上传。
触发方式
/http命令- 用户需要调用 API
- 用户想要测试端点
用法
# GET request
python scripts/http_client.py GET https://api.example.com/users
# POST with JSON body
python scripts/http_client.py POST https://api.example.com/users --json '{"name": "John"}'
# With headers
python scripts/http_client.py GET https://api.example.com/data --header "Authorization: Bearer token"
# Upload file
python scripts/http_client.py POST https://api.example.com/upload --file document.pdf
标签
http、api、rest、requests、client
兼容性
- Codex:✅
- Claude Code:✅
评论
支持 Markdown