✓ Verified 🌐 Web Scrapers ✓ Enhanced Data

Api Tester

Perform structured HTTP/HTTPS requests (GET, POST, PUT, DELETE) with custom headers and JSON body su

Rating
4.5 (176 reviews)
Downloads
530 downloads
Version
1.0.0

Overview

Perform structured HTTP/HTTPS requests (GET, POST, PUT, DELETE) with custom headers and JSON body support.

Key Features

1

Zero dependencies: Uses Node.js built-in http and https modules.

2

Auto-JSON: Automatically stringifies request body and parses response body if Content-Type matches.

3

Timeout support: Default 10s timeout, configurable.

4

Error handling: Returns structured error object instead of throwing, ensuring safe execution.

Complete Documentation

View Source →

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.

Installation

Terminal bash

openclaw install api-tester
    
Copied!

💻Code Examples

const result = await api.request('POST', 'https://api.example.com/submit', headers, payload);

const-result--await-apirequestpost-httpsapiexamplecomsubmit-headers-payload.txt
### Return Format

The `request` function returns a Promise resolving to:
example.js
const api = require('skills/api-tester');
const result = await api.request('GET', 'https://api.example.com/data');
console.log(result.status, result.data);
example.js
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);
example.js
{
  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)
}

Tags

#browser_and-automation #api #json

Quick Info

Category Web Scrapers
Model Claude 3.5
Complexity One-Click
Author wanng-ide
Last Updated 3/10/2026
🚀
Optimized for
Claude 3.5
🧠

Ready to Install?

Get started with this skill in seconds

openclaw install api-tester