Crate chrootable_https

source ·
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 http;
pub use hyper;
pub use crate::dns::DnsResolver;
pub use crate::dns::Resolver;
pub use crate::errors::*;

Modules

HTTP header types

Structs

A stream of Chunks, used when receiving bodies.
A Client to make outgoing HTTP requests.
Represents an HTTP request.
Represents an HTTP response.
A Future that will resolve to an HTTP Response.
The URI component of a request.

Enums

The type of the resource record.

Traits

Generic abstraction over HTTP clients.