返回顶部
j

jrv-http-client命令行HTTP客户端

Make HTTP requests from the command line with support for auth (Bearer, Basic, API key), custom headers, JSON/form body, response formatting, timing, and history logging. A curl replacement with agent-friendly output.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
137
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

jrv-http-client

jrv-http-client

一款面向开发者的 HTTP 客户端,适用于代理和脚本。支持所有 HTTP 方法、身份验证、请求体、格式化输出、计时和请求历史记录——无需记忆 curl 参数。

快速开始

bash

简单 GET 请求


python3 scripts/http_client.py GET https://httpbin.org/get

带 JSON 请求体的 POST

python3 scripts/http_client.py POST https://httpbin.org/post --json {name: test}

带表单数据的 POST

python3 scripts/http_client.py POST https://httpbin.org/post --form name=test&value=42

PUT 请求

python3 scripts/http_client.py PUT https://api.example.com/users/1 --json {role: admin}

DELETE 请求

python3 scripts/http_client.py DELETE https://api.example.com/users/1

Bearer 令牌认证

python3 scripts/http_client.py GET https://api.example.com/me --bearer mytoken123

基本认证

python3 scripts/http_client.py GET https://api.example.com/data --auth user:password

API 密钥请求头

python3 scripts/http_client.py GET https://api.example.com/data --api-key X-API-Key:abc123

自定义请求头

python3 scripts/http_client.py GET https://api.example.com/ --header Accept: application/json --header X-App: myapp

跟随重定向

python3 scripts/http_client.py GET https://example.com/ --follow

仅显示状态码

python3 scripts/http_client.py GET https://api.example.com/health --status-only

输出响应到文件

python3 scripts/http_client.py GET https://example.com/data.json --output response.json

超时设置

python3 scripts/http_client.py GET https://slow.api.example.com/ --timeout 10

显示请求计时

python3 scripts/http_client.py GET https://httpbin.org/get --timing

以 JSON 格式输出(适用于脚本)

python3 scripts/http_client.py GET https://httpbin.org/get --output-json

命令选项

选项描述
GET/POST/PUT/DELETE/PATCH/HEADHTTP 方法
<url>
目标 URL | | --json | JSON 请求体(设置 Content-Type: application/json) | | --form | 表单编码的请求体(key=value&key2=val2) | | --bearer | Bearer 令牌认证请求头 | | --auth | 基本认证 | | --api-key | 自定义 API 密钥请求头 | | --header | 添加自定义请求头(可重复) | | --follow | 跟随重定向(默认:否) | | --timeout N | 请求超时秒数(默认:30) | | --status-only | 仅打印 HTTP 状态码 | | --output | 将响应体保存到文件 | | --output-json | 以 JSON 格式输出完整响应(状态、请求头、响应体、计时) | | --timing | 显示请求/响应计时 | | --no-verify | 跳过 TLS 证书验证 | | --verbose | 显示发送的请求头 |

响应格式

默认情况下,响应会进行格式化输出:

  • - JSON 响应会进行语法高亮和缩进
  • 其他响应显示原始文本
  • 始终显示状态行和响应头

退出码

  • - 0 — HTTP 2xx 响应
  • 1 — HTTP 4xx/5xx 响应
  • 2 — 网络错误、超时或使用错误

使用场景

  • - API 测试:无需 Postman 即可快速检查端点
  • 健康监控:检查 API 是否返回 200
  • 认证测试:测试 Bearer/基本/API 密钥认证流程
  • Webhook 调试:向 webhook 端点发送测试负载
  • CI 脚本:触发 API 操作或在流水线中检查健康状态

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 jrv-http-client-1776191822 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 jrv-http-client-1776191822 技能

通过命令行安装

skillhub install jrv-http-client-1776191822

下载

⬇ 下载 jrv-http-client v1.0.0(免费)

文件大小: 5.39 KB | 发布时间: 2026-4-17 15:08

v1.0.0 最新 2026-4-17 15:08
Initial release of jrv-http-client — a command-line HTTP client aimed at being a curl replacement with cleaner, agent-friendly output.

- Supports all HTTP methods, authentication (Bearer, Basic, API key), custom headers, JSON/form body.
- Provides pretty-printed responses, status/timing display, and request history logging.
- Flexible output options: save to file, output as JSON, status-only mode.
- Features for scripting and automation: exit codes, timeout, TLS skip, verbose mode.
- Designed for ease of use in API testing, auth testing, monitoring, and CI scripts.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部