Package Exports
- reqzilla
Readme
Table of Contents
ReqZilla
A lightweight and powerful CLI tool for testing REST APIs directly from the terminal.
Features
- Simple and intuitive command-line interface.
- Supports GET, POST, PATCH, and DELETE requests.
- Allows sending JSON data.
- Saves responses to a file.
- Displays detailed response information in verbose mode.
- Displays only headers if required.
- Supports setting request headers, including Authorization headers (e.g., Bearer tokens for JWT).
- Follows url redirects automatically
Installation
ReqZilla requires Node.js 14 or later. You can check your version by running:
npm -vTo install ReqZilla globally using npm, run:
npm install -g reqzillaUsage
After installation, you can use reqzilla directly from your terminal.
You can get help:
reqzilla --helpalso you can get help on every existing command or option
Sending Requests
GET Request
reqzilla get <url>Example:
reqzilla get https://jsonplaceholder.typicode.com/posts/1POST Request
reqzilla post <url> -d '<JSON data>'Example:
reqzilla post https://jsonplaceholder.typicode.com/posts -d '{"title": "foo", "body": "bar", "userId": 1}'PATCH Request
reqzilla patch <url> -d '<JSON data>'Example:
reqzilla patch https://jsonplaceholder.typicode.com/posts/1 -d '{"title": "updated title"}'DELETE Request
reqzilla delete <url>Example:
reqzilla delete https://jsonplaceholder.typicode.com/posts/1Additional Options
-H, --Header <header>: Add request headers (supports all types, including JWT Authorization headers).-o, --outputFile <FileName>: Save response to a file.-v, --verbose: Show detailed response info (status, headers, and body).-I, --onlyHeaders: Show only response headers.
Examples
Example with Headers
reqzilla get https://jsonplaceholder.typicode.com/posts/1 -H 'Accept: application/json'Example with Output to File
reqzilla get https://jsonplaceholder.typicode.com/posts/1 -o response.jsonExample Verbose Mode
reqzilla get https://jsonplaceholder.typicode.com/posts/1 -vExample with Only Headers
reqzilla get https://jsonplaceholder.typicode.com/posts/1 -IContributing
Contributions are welcome! Feel free to open an issue or submit a pull request on GitHub: ReqZilla Repository
License
This project is licensed under the MIT License.
Happy testing with ReqZilla!