Api Tester
VerifiedPerform structured HTTP/HTTPS requests (GET, POST, PUT, DELETE) with custom headers and JSON body support. Use for API testing, health checks, or interacting...
$ Add to .claude/skills/ About This Skill
# API Tester
A lightweight, dependency-free HTTP client for OpenClaw.
Usage
Basic GET Request
```javascript 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
```javascript const api = require('skills/api-tester'); const payload = { key: 'value' }; const headers = { 'Authorization': 'Bearer <token>' }; const result = await api.request('POST', 'https://api.example.com/submit', headers, payload); ```
Return Format
The `request` function returns a Promise resolving to:
```javascript { 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.
Use Cases
- Send HTTP requests to REST APIs directly from JavaScript code without external libraries
- Test API authentication flows by including custom headers and bearer tokens
- Validate API response formats and data structures during development
- Build automated API test scripts using a lightweight, dependency-free HTTP client
- Chain multiple API requests in sequence for end-to-end workflow testing
Pros & Cons
Pros
- +Zero external dependencies — works with just Node.js built-in modules
- +Clean JavaScript API with async/await support for modern code patterns
- +Supports all HTTP methods, custom headers, and JSON request/response handling
Cons
- -JavaScript-only — not usable from Python, Shell, or other language environments
- -No assertion library or test reporting — just a raw HTTP client
- -Basic feature set that Node.js fetch or axios already provide
FAQ
What does Api Tester do?
What platforms support Api Tester?
What are the use cases for Api Tester?
100+ free AI tools
Writing, PDF, image, and developer tools — all in your browser.
Next Step
Use the skill detail page to evaluate fit and install steps. For a direct browser workflow, move into a focused tool route instead of staying in broader support surfaces.