首页龙虾技能列表 › API Tester — 接口测试

API Tester — 接口测试

v1.0.0

API 接口测试工具,支持 HTTP 请求发送、响应验证和接口调试。

3· 5,000·80 当前·81 累计
by @wanng-ide (WANGJUNJIE)·MIT-0
下载技能包
License
MIT-0
最后更新
2026/2/26
安全扫描
VirusTotal
无害
查看报告
OpenClaw
安全
high confidence
该技能是一个简单的 API 测试封装,与声明目的一致,需要 API 凭证但未在元数据中声明。
评估建议
该技能用于测试 API 端点,内部一致。安装前请考虑:1) 脚本需要目标 API 的凭证——确认您信任提供这些凭证的环境;2) 优先使用范围受限的 API 令牌;3) 在生产 API 上测试时使用只读或沙盒凭证。...
详细分析 ▾
用途与能力
技能名称/描述与指令匹配:提供使用 curl 和 HTTP 请求的 API 测试能力。
指令范围
指令范围狭窄,仅限于发起 HTTP 请求和检查响应。不指示读取无关系统文件或访问目标 API 以外的其他服务。
安装机制
仅指令技能,无安装规范。安装风险低。
凭证需求
技能可能需要 API 凭证进行测试,但这些由用户提供且未在注册元数据中声明。
持久化与权限
always:false 且无持久系统修改。技能不修改其他技能或系统范围设置。
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv1.0.02026/2/15

- Initial release of api-tester, a lightweight, dependency-free HTTP client for OpenClaw. - Supports structured HTTP/HTTPS requests (GET, POST, PUT, DELETE) with custom headers and JSON body. - Automatically stringifies JSON bodies and parses JSON responses. - Includes timeout support (default 10s, configurable). - Provides structured response with status, headers, parsed data, raw body, and error messaging. - No external dependencies; uses Node.js built-in http/https modules.

● 无害

安装命令 点击复制

官方npx clawhub@latest install api-tester
镜像加速npx clawhub@latest install api-tester --registry https://cn.clawhub-mirror.com

技能文档

A lightweight, dependency-free HTTP client for OpenClaw.

Usage

Basic GET Request

const api = require('skills/api-tester');
const result = await api.request('GET', 'https://api.example.com/data');
console.log(result.status, result.data);

POST Request with JSON Body

const api = require('skills/api-tester');
const payload = { key: 'value' };
const headers = { 'Authorization': 'Bearer ' };
const result = await api.request('POST', 'https://api.example.com/submit', headers, payload);

Return Format

The request function returns a Promise resolving to:

{
  status: 200,          // HTTP status code
  headers: { ... },     // Response headers
  data: { ... },        // Parsed JSON body (if applicable) or raw string
  raw: "...",           // Raw response body string
  error: "..."          // Error message if request failed (network error, timeout)
}

Features

  • Zero dependencies: Uses Node.js built-in http and https modules.
  • Auto-JSON: Automatically stringifies request body and parses response body if Content-Type matches.
  • Timeout support: Default 10s timeout, configurable.
  • Error handling: Returns structured error object instead of throwing, ensuring safe execution.
数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制

免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制

了解定制服务