Crates.io | ruxios |
lib.rs | ruxios |
version | 0.1.2 |
source | src |
created_at | 2023-10-19 01:33:53.288886 |
updated_at | 2023-10-19 02:36:11.152837 |
description | Ruxios is an HTTP library for Rust, inspired by Axios, with a simple yet robust interface |
homepage | |
repository | https://github.com/devzolo/ruxios |
max_upload_size | |
id | 1007400 |
size | 21,807 |
Ruxios is a lightweight yet powerful HTTP request library for Rust. Inspired by libraries like Axios, Ruxios provides a straightforward but mighty interface for your Rust applications.
Add this to your Cargo.toml
:
[dependencies]
ruxios = { version = "0.1.2" }
tokio = { version = "1.33.0", features = ["full"] }
serde = { version = "1.0.189", features = ["derive"] }
serde_json = "1.0.107"
use ruxios::prelude::*;
let api = Ruxios::from(RuxiosConfig {
base_url: String::from("https://api.mysite.com"),
..Default::default()
});
let res = api.get::<Value, Value>("/my-route").await;
match res {
Ok(res) => println!("{:?}", res.data),
Err(err) => println!("{:?}", err),
}
fetch!
macro for quick GET requests.For a deeper dive, check out our full documentation.
git checkout -b my-new-feature
.git commit -am 'Add some feature'
.git push origin my-new-feature
.This library is licensed under the MIT License. See the LICENSE file for details.