Install
openclaw skills install api-testerPerform structured HTTP/HTTPS requests (GET, POST, PUT, DELETE) with custom headers and JSON body support. Use for API testing, health checks, or interacting with REST services programmatically without relying on curl.
openclaw skills install api-testerA lightweight, dependency-free HTTP client for OpenClaw.
const api = require('skills/api-tester');
const result = await api.request('GET', 'https://api.example.com/data');
console.log(result.status, result.data);
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);
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)
}
http and https modules.