![rust-api-test](https://private-user-images.githubusercontent.com/26869583/313292632-10445b8d-7bbb-46a9-bfef-e49662a9176b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA1MTU5MTAsIm5iZiI6MTcyMDUxNTYxMCwicGF0aCI6Ii8yNjg2OTU4My8zMTMyOTI2MzItMTA0NDViOGQtN2JiYi00NmE5LWJmZWYtZTQ5NjYyYTkxNzZiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA5VDA5MDAxMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWVjMWYwNDBkNzFhNzE5OTEwZGEyYTEzZmYwM2E3ODM5YmMzOThjMDcxY2I1MDYzNzFlNDE1ZTJmZDdmODc5NTImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.YgbXbv1lz9MZt0PCCnjzi6jA3oEQ5pIBU32vKWY_Kig)
rust-api-test
is a Rust package that provides a command-line interface (CLI) for testing REST APIs in real-time. It allows Rust developers to easily perform HTTP GET, POST, PUT, and DELETE requests from the command line.
- Simple and easy-to-use CLI interface
- Supports GET, POST, PUT, and DELETE HTTP methods
- Real-time testing of REST APIs
- JSON request and response handling
To use rust-api-test, you need to have Rust and Cargo installed on your system. You can install them from rustup.rs.
Once you have Rust and Cargo installed, you can install rust-api-test using Cargo:
cargo install rust-api-test
To use rust-api-test
in your Rust project, simply add it as a dependency in your Cargo.toml
file:
[dependencies]
rust-api-test = "1.1.1"
rust-api-test <method> <url> [body]
Get data from an API endpoint
rust-api-test GET https://jsonplaceholder.typicode.com/posts/1
Post data to an API endpoint
rust-api-test POST https://jsonplaceholder.typicode.com/posts userId=1 title="Test Title" body="Test Body"
-
reqwest - HTTP client for Rust.
-
serde_json - JSON serialization and deserialization library for Rust.
Contributions are welcome! If you encounter any issues or have suggestions for improvements, feel free to open an issue or submit a pull request on GitHub.
This project is licensed under the MIT License - see the LICENSE file for details.