Crates.io | nightfly-twitchax-patch |
lib.rs | nightfly-twitchax-patch |
version | 0.1.6 |
source | src |
created_at | 2024-01-20 00:47:16.761339 |
updated_at | 2024-01-20 00:47:16.761339 |
description | higher level HTTP client library for the lunatic runtime |
homepage | |
repository | https://github.com/SquattingSocrates/nightfly |
max_upload_size | |
id | 1105934 |
size | 340,243 |
This project is an ongoing effort to port the reqwest library to the lunatic runtime
An ergonomic, batteries-included HTTP Client for the lunatic runtime written in Rust.
Plain bodies, JSON, urlencoded, multipart (see examples)
Redirects with different policies
HTTPS via lunatic-native TLS (see examples)
Cookie Store
Customizable function-based redirect policy (IN PROGRESS)
HTTP Proxies (IN PROGRESS)
This example uses Lunatic and enables some
optional features, so your Cargo.toml
could look like this:
[dependencies]
nightfly = { "0.1.0" }
lunatic = { "0.12.0" }
And then the code:
use std::collections::HashMap;
#[lunatic::main]
fn main() {
let resp = nightfly::get("https://httpbin.org/ip")
.unwrap()
.json::<HashMap<String, String>>()
.unwrap();
println!("{:#?}", resp);
Ok(())
}
Licensed under either of
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.