| Crates.io | clienter |
| lib.rs | clienter |
| version | 0.1.2 |
| created_at | 2025-02-07 08:41:08.560121+00 |
| updated_at | 2025-02-16 10:33:30.75307+00 |
| description | A simple, lightweight, zero dependency, HTTP client for Rust |
| homepage | https://github.com/sanchez/clienter |
| repository | https://github.com/sanchez/clienter |
| max_upload_size | |
| id | 1546660 |
| size | 54,579 |
Clienter is a project designed to manage client interactions and data efficiently. This README provides an overview of the project, how to set it up, and how to contribute.
To install the project, follow these steps:
git clone https://github.com/yourusername/clienter.git
cd clienter
cargo build
To run the project, use:
cargo run
To run the tests:
cargo test
Here are some examples of how to use the clienter library:
use clienter::{HttpClient, HttpMethod};
fn main() {
let client = HttpClient::new();
let request = client.request(HttpMethod::GET, "http://httpbin.org/anything");
let mut response = client.send(&request).unwrap();
println!("Status: {}", response.status);
let body = response.body_as_string().unwrap();
println!("Body: {}", body);
}
use clienter::{HttpClient, HttpMethod, HttpRequest};
fn main() {
let client = HttpClient::new();
let mut request = client.request(HttpMethod::POST, "http://httpbin.org/post");
request.set_body(r#"{"key": "value"}"#);
let mut response = client.send(&request).unwrap();
println!("Status: {}", response.status);
let body = response.body_as_string().unwrap();
println!("Body: {}", body);
}
This project is licensed under the MIT License. See the LICENSE file for details.