{"skill":{"slug":"http-request-builder","displayName":"HTTP Request Builder","summary":"Build, test, and save HTTP requests from the CLI with custom headers, auth, body, cookies, templates, interactive mode, and request history tracking.","description":"---\nname: http-request-builder\ndescription: Build and test HTTP requests with CLI interface: headers, auth, body, cookies, with history and templates.\nversion: 1.0.0\nauthor: skill-factory\nmetadata:\n  openclaw:\n    requires:\n      bins:\n        - python3\n      python:\n        - requests\n---\n\n# HTTP Request Builder\n\n## What This Does\n\nA CLI tool to build, test, and save HTTP requests. Send requests with custom headers, authentication, body, and cookies. Save requests as templates for reuse and maintain a history of your HTTP calls.\n\nKey features:\n- **Send HTTP requests** with GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS methods\n- **Set custom headers** with key-value pairs\n- **Add authentication** (Basic Auth, Bearer tokens)\n- **Include request body** (JSON, form data, raw text)\n- **Manage cookies** for requests\n- **Save requests as templates** (JSON files) for reuse\n- **Load and execute** saved templates\n- **Interactive mode** for building requests step-by-step\n- **Command-line mode** for scripting and automation\n- **Request history** tracks your recent HTTP calls\n\n## When To Use\n\n- You need to test REST API endpoints quickly from the terminal\n- You want to save and reuse complex API requests\n- You prefer a CLI tool over GUI applications like Postman\n- You need to automate API testing in scripts\n- You want to share API request configurations with team members\n- You're debugging API issues and need to replay requests\n\n## Usage\n\nBasic commands:\n\n```bash\n# Send a GET request\npython3 scripts/main.py get https://api.example.com/data\n\n# Send a POST request with JSON body\npython3 scripts/main.py post https://api.example.com/api \\\n  --header \"Content-Type: application/json\" \\\n  --body '{\"name\": \"test\", \"value\": 123}'\n\n# Send with Basic authentication\npython3 scripts/main.py get https://api.example.com/secure \\\n  --auth basic --username admin --password secret\n\n# Send with Bearer token\npython3 scripts/main.py get https://api.example.com/secure \\\n  --auth bearer --token \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9\"\n\n# Save request as template\npython3 scripts/main.py post https://api.example.com/api \\\n  --header \"Content-Type: application/json\" \\\n  --body '{\"name\": \"test\"}' \\\n  --save-template my-request\n\n# Load and execute template\npython3 scripts/main.py template my-request\n\n# Interactive mode\npython3 scripts/main.py interactive\n\n# View request history\npython3 scripts/main.py history\n\n# Clear history\npython3 scripts/main.py history --clear\n```\n\n## Examples\n\n### Example 1: Simple GET request\n\n```bash\npython3 scripts/main.py get https://jsonplaceholder.typicode.com/posts/1\n```\n\nOutput:\n```\nResponse Status: 200 OK\nResponse Headers:\n  content-type: application/json; charset=utf-8\n  ...\n\nResponse Body:\n{\n  \"userId\": 1,\n  \"id\": 1,\n  \"title\": \"sunt aut facere repellat provident occaecati excepturi optio reprehenderit\",\n  \"body\": \"quia et suscipit\\nsuscipit recusandae consequuntur expedita et cum\\nreprehenderit molestiae ut ut quas totam\\nnostrum rerum est autem sunt rem eveniet architecto\"\n}\n```\n\n### Example 2: POST request with JSON body and headers\n\n```bash\npython3 scripts/main.py post https://jsonplaceholder.typicode.com/posts \\\n  --header \"Content-Type: application/json\" \\\n  --header \"X-API-Key: my-secret-key\" \\\n  --body '{\n    \"title\": \"foo\",\n    \"body\": \"bar\",\n    \"userId\": 1\n  }'\n```\n\n### Example 3: Save and reuse request template\n\n```bash\n# Save template\npython3 scripts/main.py post https://api.example.com/users \\\n  --header \"Content-Type: application/json\" \\\n  --header \"Authorization: Bearer token123\" \\\n  --body '{\"name\": \"New User\"}' \\\n  --save-template create-user\n\n# Use template later\npython3 scripts/main.py template create-user\n\n# List all templates\npython3 scripts/main.py templates\n```\n\n### Example 4: Interactive mode\n\n```bash\npython3 scripts/main.py interactive\n```\n\nInteractive mode guides you through:\n1. HTTP method selection\n2. URL input\n3. Headers configuration\n4. Authentication setup\n5. Request body input\n6. Send request and view results\n\n## Requirements\n\n- Python 3.x\n- `requests` library (installed automatically or via pip)\n\nInstall missing dependencies:\n```bash\npip3 install requests\n```\n\n## Limitations\n\n- This is a CLI tool, not a GUI application\n- History and templates stored in simple JSON files in `~/.http-request-builder/`\n- Limited authentication support (Basic, Bearer tokens only)\n- No OAuth, API key in header, or complex authentication flows\n- No cookie persistence across sessions (cookies only for single request)\n- No proxy configuration support\n- No SSL certificate verification controls\n- No support for websockets or streaming responses\n- No advanced features like response validation or testing assertions\n- Request history limited to 100 entries by default\n- Templates are simple JSON files without encryption\n- No built-in support for environment variables in templates\n- Performance limited by Python requests library\n- Large response bodies may be truncated for display\n- No support for multipart form data file uploads\n- No built-in rate limiting or retry logic\n- No support for HTTP/2 or HTTP/3 protocols\n\n## Directory Structure\n\nThe tool stores data in `~/.http-request-builder/`:\n- `templates/` - Saved request templates (JSON files)\n- `history.json` - Request history log\n- `config.json` - Configuration (if any)\n\n## Error Handling\n\n- Invalid URLs return helpful error messages\n- Network timeouts after 30 seconds\n- JSON parsing errors show the problematic content\n- Missing templates indicate which template wasn't found\n- Authentication failures suggest correct format\n\n## Contributing\n\nThis is a skill built by the Skill Factory. Issues and improvements should be reported through the OpenClaw project.","tags":{"latest":"1.0.0"},"stats":{"comments":0,"downloads":892,"installsAllTime":3,"installsCurrent":3,"stars":0,"versions":1},"createdAt":1772546484851,"updatedAt":1778994858948},"latestVersion":{"version":"1.0.0","createdAt":1772546484851,"changelog":"Initial release: A command-line tool to build, test, and save HTTP requests with support for headers, authentication, request bodies, cookies, history, and templates.\n\n- Send requests with GET, POST, PUT, DELETE, PATCH, HEAD, and OPTIONS methods.\n- Support for custom headers, Basic and Bearer authentication, request body in JSON/raw/form, and cookies.\n- Save and load HTTP requests as reusable templates.\n- Interactive and command-line modes for flexibility.\n- Maintains a request history and provides commands for managing templates and history.\n- Simple error handling and helpful user feedback.","license":null},"metadata":null,"owner":{"handle":"derick001","userId":"s17cgtq72c704n9jrtdh3v2eq983fhgb","displayName":"Derick","image":"https://avatars.githubusercontent.com/u/114499711?v=4"},"moderation":{"isSuspicious":false,"isMalwareBlocked":false,"verdict":"clean","reasonCodes":["review.llm_review"],"summary":"Review: review.llm_review","engineVersion":"v2.4.24","updatedAt":1780089743810}}