2 releases

0.1.1 Apr 23, 2020
0.1.0 Apr 23, 2020

#10 in #fahrenheit

MIT license

7KB
79 lines

Have you ever wondered if you could run hyper on fahrenheit? I bet you haven't, but yes, you can (but please don't).

Example:

use fahrenheit;
use hyper::{Client, Uri};
use hyper_fahrenheit::{Connector, FahrenheitExecutor};

fahrenheit::run(async move {
  let client: Client<Connector, hyper::Body> = Client::builder()
      .executor(FahrenheitExecutor)
      .build(Connector);
  let res = client
      .get(Uri::from_static("http://httpbin.org/ip"))
      .await
      .unwrap();
  println!("status: {}", res.status());
  let buf = hyper::body::to_bytes(res).await.unwrap();
  println!("body: {:?}", buf);
});

Dependencies

~11–21MB
~276K SLoC