smithery/mattgotteiner

rest-http-caller

Make HTTP/REST API calls using a C# script. Use this skill when you need to call REST APIs, fetch data from web services, send POST/PUT/DELETE requests, or test HTTP endpoints. Supports all HTTP methods, custom headers, request bodies, and authentication.

Installation

$ npx skills add smithery/mattgotteiner --skill rest-http-caller

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 4,667 B
  • docs SUMMARY.md 279 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

REST HTTP Caller Skill

This skill enables you to make HTTP/REST API calls using a simple C# script that runs with dotnet run.

Prerequisites

  • .NET 10 or later installed (for dotnet run app.cs support)
  • Network access to the target endpoint

Usage

Run the HTTP caller script using dotnet run:

dotnet run HttpCaller.cs -- <METHOD> <URL> [OPTIONS]

Arguments

Argument Required Description
METHOD Yes HTTP method: GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
URL Yes The full URL to call (must include scheme, e.g., https://)

Options

Option Description Example
--header or -H Add a header (can be used multiple times) --header "Authorization: Bearer token123"
--body or -b Request body (JSON string) --body '{"name": "test"}'
--body-file or -f Read request body from a file --body-file request.json
--timeout or -t Request timeout in seconds (default: 30) --timeout 60
--output or -o Save response body to a file --output response.json
--verbose or -v Show detailed request/response info --verbose
--help or -? Show help and usage information --help

Examples

GET Request

dotnet run HttpCaller.cs -- GET https://api.example.com/users

GET with Authentication Header

dotnet run HttpCaller.cs -- GET https://api.example.com/users --header "Authorization: Bearer YOUR_TOKEN_HERE"

POST with JSON Body

dotnet run HttpCaller.cs -- POST https://api.example.com/users --header "Content-Type: application/json" --body '{"name": "John Doe", "email": "[email protected]"}'

PUT Request with Body from File

dotnet run HttpCaller.cs -- PUT https://api.example.com/users/123 --header "Content-Type: application/json" --body-file update-user.json

DELETE Request

dotnet run HttpCaller.cs -- DELETE https://api.example.com/users/123 --header "Authorization: Bearer YOUR_TOKEN_HERE"

Multiple Headers

dotnet run HttpCaller.cs -- POST https://api.example.com/data --header "Content-Type: application/json" --header "Authorization: Bearer TOKEN" --header "X-Custom-Header: value" --body '{"data": "test"}'

Verbose Output with Timeout

dotnet run HttpCaller.cs -- GET https://api.example.com/slow-endpoint --timeout 120 --verbose

Save Response to File

dotnet run HttpCaller.cs -- GET https://api.example.com/large-data --output data.json

Script Location

The HTTP caller script is located at: [HttpCaller.cs](./HttpCaller.cs)

Output Format

The script outputs:

  • Status: HTTP status code and reason phrase
  • Headers: Response headers (in verbose mode)
  • Body: Response body (JSON is automatically formatted)

Example Output

=== HTTP Response ===
Status: 200 OK

Body:
{
  "id": 123,
  "name": "John Doe",
  "email": "[email protected]"
}

Verbose Output

=== HTTP Request ===
Method: POST
URL: https://api.example.com/users
Headers:
  Content-Type: application/json
  Authorization: Bearer ***
Body:
{"name": "John Doe", "email": "[email protected]"}

=== HTTP Response ===
Status: 201 Created
Headers:
  Content-Type: application/json
  X-Request-Id: abc123
Body:
{
  "id": 456,
  "name": "John Doe",
  "email": "[email protected]"
}

Common Use Cases

  1. Testing APIs: Quickly test REST endpoints during development
  2. Fetching Data: Retrieve data from external services
  3. Automation: Integrate API calls into workflows
  4. Debugging: Use verbose mode to inspect request/response details
  5. Authentication Testing: Test various auth mechanisms (Bearer, API Key, Basic)

Error Handling

The script provides clear error messages for common issues:

  • Network errors
  • Invalid URLs
  • Timeout errors
  • HTTP error status codes (4xx, 5xx)

Tips for LLM Usage

When using this skill, fill in:

  1. METHOD: Choose the appropriate HTTP method for the operation
  2. URL: Provide the complete endpoint URL
  3. Headers: Add necessary headers like Content-Type, Authorization, etc.
  4. Body: For POST/PUT/PATCH, provide the request body as JSON

Always include Content-Type: application/json header when sending JSON data.