2 releases
0.1.2 | Nov 5, 2024 |
---|---|
0.1.1 | Nov 5, 2024 |
#280 in #requests
227 downloads per month
13KB
187 lines
rusty_request
rusty_request
is a lightweight Rust library designed to simplify making HTTP GET requests. Whether you are fetching data from a REST API or a web resource, rusty_request
provides an easy and efficient way to handle GET requests.
Features
- Simple API: Intuitive and easy-to-use functions for making GET requests.
- Error Handling: Built-in mechanisms to handle common HTTP errors gracefully.
- Response Parsing: Automatically parses JSON responses into Rust data structures.
- Timeout Support: Configurable timeouts for requests to prevent hanging on unresponsive servers.
- Custom Headers: Support for adding custom headers to your requests.
- Cross-Platform: Works seamlessly across different operating systems.
Installation
Add the following line to your Cargo.toml
file:
[dependencies]
rusty_request = "0.1.1"
use request::Get;
let get = Get::new(&stream);
get.path("/api/path").content(//data here).send();
Dependencies
~7–17MB
~233K SLoC