搜索

PythonReactSEOPDF
OpenClaw

api-endpoint-tester

CLI tool to test REST API endpoints with various HTTP methods, headers, and payloads.

derick0010 来源安装数☆ 0 仓库 Starsv1.0.0

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

SkillHub CLI

skillhub install derick001/api-endpoint-tester

打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。

将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。

查看来源 ↗使用指南

技能说明

API Endpoint Tester

What This Does

A simple CLI tool to send HTTP requests to REST API endpoints and validate responses. Supports GET, POST, PUT, DELETE, PATCH methods with custom headers and request bodies (JSON or form data).

When To Use

  • You need to test API endpoints manually or in scripts
  • You want to validate HTTP status codes and response formats
  • You're debugging API integrations and need quick requests
  • You need to check if an endpoint is reachable and responding correctly

Usage

Basic GET request: python3 scripts/main.py run --url "https://api.example.com/users" --method GET

POST with JSON body: python3 scripts/main.py run --url "https://api.example.com/users" --method POST --body '{"name": "John", "email": "john@example.com"}'

With custom headers: python3 scripts/main.py run --url "https://api.example.com/users" --method GET --headers '{"Authorization": "Bearer token123"}'

Examples

Example 1: Simple GET request
python3 scripts/main.py run --url "https://jsonplaceholder.typicode.com/posts/1" --method GET

Output:

{
  "status": "success",
  "status_code": 200,
  "headers": {
    "content-type": "application/json; charset=utf-8"
  },
  "body": {
    "userId": 1,
    "id": 1,
    "title": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit",
    "body": "quia et suscipit\nsuscipit recusandae consequuntur expedita et cum\nreprehenderit molestiae ut ut quas totam\nnostrum rerum est autem sunt rem eveniet architecto"
  },
  "response_time_ms": 245
}
Example 2: POST with validation
python3 scripts/main.py run --url "https://jsonplaceholder.typicode.com/posts" --method POST --body '{"title": "foo", "body": "bar", "userId": 1}' --expected-status 201

Requirements

  • Python 3.x
  • requests library (install via pip if not available)

Limitations

  • This is a CLI tool, not an auto-integration plugin
  • Does not support WebSocket or streaming endpoints
  • Limited to H...

来源信息

Source
github
Repository
openclaw/skills
Path
skills/derick001/api-endpoint-tester
Version
1.0.0
Commit
1b95c192c2334a7526a787634894c313328f3543
分类来源
rules
状态
active
可见性
public

这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。

README

API Endpoint Tester

A command-line tool for testing REST API endpoints with various HTTP methods, headers, and payloads.

Installation

This skill requires Python 3.x and the requests library.

pip install requests

Quick Start

# Basic GET request
python3 scripts/main.py run --url "https://jsonplaceholder.typicode.com/posts/1" --method GET

# POST with JSON body
python3 scripts/main.py run --url "https://jsonplaceholder.typicode.com/posts" --method POST --body '{"title": "test", "body": "content"}'

# With custom headers
python3 scripts/main.py run --url "https://api.example.com/data" --method GET --headers '{"Authorization": "Bearer token123", "User-Agent": "MyApp"}'

Command Reference

python3 scripts/main.py run [OPTIONS]

Options:

  • --url: Target URL (required)
  • --method: HTTP method (GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS). Default: GET
  • --headers: JSON string of headers. Default: {}
  • --body: Request body (JSON or form data). Default: null
  • --timeout: Request timeout in seconds. Default: 10
  • --expected-status: Expected HTTP status code. If provided, will check against actual status.
  • --verify-ssl: Verify SSL certificates. Default: true
  • --allow-redirects: Follow redirects. Default: true
  • --output-file: Save response to file (optional)

Response Format

The tool returns a JSON object with the following structure:

{
  "status": "success" | "error",
  "error_message": "Description if status is error",
  "status_code": 200,
  "headers": {},
  "body": {},
  "response_time_ms": 123,
  "url": "https://example.com",
  "method": "GET"
}

Examples

Basic GET Request
python3 scripts/main.py run --url "https://jsonplaceholder.typicode.com/posts/1"
POST with JSON Body
python3 scripts/main.py run \
  --url "https://jsonplaceholder.typicode.com/posts" \
  --method POST \
  --body '{"title": "My Post", "body": "Content here", "userId": 1}' \
  --head...

来源内容

SKILL.md
# API Endpoint Tester

## What This Does

A simple CLI tool to send HTTP requests to REST API endpoints and validate responses. Supports GET, POST, PUT, DELETE, PATCH methods with custom headers and request bodies (JSON or form data).

## When To Use

- You need to test API endpoints manually or in scripts
- You want to validate HTTP status codes and response formats
- You're debugging API integrations and need quick requests
- You need to check if an endpoint is reachable and responding correctly

## Usage

Basic GET request:
python3 scripts/main.py run --url "https://api.example.com/users" --method GET

POST with JSON body:
python3 scripts/main.py run --url "https://api.example.com/users" --method POST --body '{"name": "John", "email": "john@example.com"}'

With custom headers:
python3 scripts/main.py run --url "https://api.example.com/users" --method GET --headers '{"Authorization": "Bearer token123"}'

## Examples

### Example 1: Simple GET request

```bash
python3 scripts/main.py run --url "https://jsonplaceholder.typicode.com/posts/1" --method GET
```

Output:
```json
{
  "status": "success",
  "status_code": 200,
  "headers": {
    "content-type": "application/json; charset=utf-8"
  },
  "body": {
    "userId": 1,
    "id": 1,
    "title": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit",
    "body": "quia et suscipit\nsuscipit recusandae consequuntur expedita et cum\nreprehenderit molestiae ut ut quas totam\nnostrum rerum est autem sunt rem eveniet architecto"
  },
  "response_time_ms": 245
}
```

### Example 2: POST with validation

```bash
python3 scripts/main.py run --url "https://jsonplaceholder.typicode.com/posts" --method POST --body '{"title": "foo", "body": "bar", "userId": 1}' --expected-status 201
```

## Requirements

- Python 3.x
- `requests` library (install via pip if not available)

## Limitations

- This is a CLI tool, not an auto-integration plugin
- Does not support WebSocket or streaming endpoints
- Limited to H...
README
# API Endpoint Tester

A command-line tool for testing REST API endpoints with various HTTP methods, headers, and payloads.

## Installation

This skill requires Python 3.x and the `requests` library.

```bash
pip install requests
```

## Quick Start

```bash
# Basic GET request
python3 scripts/main.py run --url "https://jsonplaceholder.typicode.com/posts/1" --method GET

# POST with JSON body
python3 scripts/main.py run --url "https://jsonplaceholder.typicode.com/posts" --method POST --body '{"title": "test", "body": "content"}'

# With custom headers
python3 scripts/main.py run --url "https://api.example.com/data" --method GET --headers '{"Authorization": "Bearer token123", "User-Agent": "MyApp"}'
```

## Command Reference

```
python3 scripts/main.py run [OPTIONS]
```

Options:
- `--url`: Target URL (required)
- `--method`: HTTP method (GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS). Default: GET
- `--headers`: JSON string of headers. Default: {}
- `--body`: Request body (JSON or form data). Default: null
- `--timeout`: Request timeout in seconds. Default: 10
- `--expected-status`: Expected HTTP status code. If provided, will check against actual status.
- `--verify-ssl`: Verify SSL certificates. Default: true
- `--allow-redirects`: Follow redirects. Default: true
- `--output-file`: Save response to file (optional)

## Response Format

The tool returns a JSON object with the following structure:

```json
{
  "status": "success" | "error",
  "error_message": "Description if status is error",
  "status_code": 200,
  "headers": {},
  "body": {},
  "response_time_ms": 123,
  "url": "https://example.com",
  "method": "GET"
}
```

## Examples

### Basic GET Request

```bash
python3 scripts/main.py run --url "https://jsonplaceholder.typicode.com/posts/1"
```

### POST with JSON Body

```bash
python3 scripts/main.py run \
  --url "https://jsonplaceholder.typicode.com/posts" \
  --method POST \
  --body '{"title": "My Post", "body": "Content here", "userId": 1}' \
  --head...

相关技能

OpenClaw

humanpages

human-pages-ai

Search and hire real humans for tasks — photography, delivery, research, and more

OpenClaw

openclaw-skills

zseven-w

Reusable skill templates for OpenClaw AI agents. Templates for API integration, data processing, web scraping, CLI tools, and file processing.

OpenClaw

0xarchive

0xfantommenace

Query historical crypto market data from 0xArchive across Hyperliquid, Lighter.xyz, and HIP-3. Covers orderbooks, trades, candles, funding rates, open interest, liquidations, and data quality. Use when the user...

OpenClaw

1sec-security

cutmob

Install, configure, and manage 1-SEC — an open-source, all-in-one cybersecurity platform (16 modules, single binary) on Linux servers and VPS instances. Use when the user asks to secure a server, install securi...