Expand description
This crate provides a chroot/sandbox friendly https client.
It doesn’t depend on any files from the filesystem which would usually cause issues if /etc/resolv.conf or ca-certificates can not be found.
§Example
extern crate chrootable_https;
use chrootable_https::{Resolver, Client};
let resolver = Resolver::cloudflare();
let client = Client::new(resolver);
let reply = client.get("https://httpbin.org/anything").wait_for_response().expect("request failed");
println!("{:#?}", reply);
Re-exports§
pub use crate::dns::DnsResolver;
pub use crate::dns::Resolver;
pub use http;
pub use hyper;
pub use crate::errors::*;
Modules§
Structs§
- Body
- A stream of
Chunk
s, used when receiving bodies. - Client
- A Client to make outgoing HTTP requests.
- Request
- Represents an HTTP request.
- Response
- Represents an HTTP response.
- Response
Future - A
Future
that will resolve to an HTTP Response. - Uri
- The URI component of a request.
Enums§
- Record
Type - The type of the resource record.
Traits§
- Http
Client - Generic abstraction over HTTP clients.