A Python CLI application for sending HTTP requests using different methods (GET, POST, PUT, PATCH, DELETE).
pip install restx
poetry add restx
restx get <url_with_endpoint>
# Example: restx get https://jsonplaceholder.typicode.com/posts/
restx get <url_with_endpoint>
# Example: restx get https://jsonplaceholder.typicode.com/posts/54
restx post <url_with_endpoint> --payload '<json payload>'
# Example: restx post "https://jsonplaceholder.typicode.com/posts" --payload '{"userId": 12, "title": "test doc body"}'
restx put <url_with_endpoint> --payload '<json payload>'
# Example: restx put "https://jsonplaceholder.typicode.com/posts" --payload '{"userId": 12, "title": "test doc body"}'
restx patch <url_with_endpoint> --payload '<json payload>'
# Example: restx patch "https://jsonplaceholder.typicode.com/posts" --payload '{"title": "test doc body"}'
restx delete <url_with_endpoint> --payload '<json payload>'
# Example: restx delete "https://jsonplaceholder.typicode.com/posts/23"
restx <command> <url> --header '<json header>'
# Example:
# restx post https://jsonplaceholder.typicode.com/posts --payload '{"userId": 1, "id": 1, "title": "sunt aut facere, "body": "recusandae consequuntur expedita et"}' --header '{"Content-Type": "application/json"}'
restx --help
restx <get|post|put|patch|delete> --help
Contributions are welcome! Please follow these guidelines:
- Submit bug reports or feature requests through the issue tracker.
- Set up a development environment by cloning the repository and installing dependencies.
This project is licensed under the MIT. See the LICENSE file for details.