Skip to content

tqwewe/nightfly

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nightfly

Disclaimer

This project is still highly experimental and therefore not to be used in production

MIT/Apache-2 licensed

An ergonomic, batteries-included HTTP Client for the lunatic runtime written in Rust.

  • Plain bodies, JSON, urlencoded, multipart (see examples)
  • Customizable redirect policy (IN PROGRESS)
  • HTTP Proxies (IN PROGRESS)
  • HTTPS via lunatic-native TLS (see examples)
  • Cookie Store (IN PROGRESS)
  • Changelog

Example

This example uses Lunatic and enables some optional features, so your Cargo.toml could look like this:

[dependencies]
nightfly = { git = "https://github.com/SquattingSocrates/nightfly" }
lunatic = { git = "https://github.com/lunatic-solutions/lunatic-rs" }

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(())
}

Requirements

License

Licensed under either of

Contribution

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.

About

An easy and powerful Rust HTTP Client

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%