[][src]Crate chrootable_https

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

cache
dns
errors
header

HTTP header types

socks5

Structs

Body

A stream of Chunks, used when receiving bodies.

Client

A Client to make outgoing HTTP requests.

Request

Represents an HTTP request.

Response

Represents an HTTP response.

ResponseFuture

A Future that will resolve to an HTTP Response.

Uri

The URI component of a request.

Enums

RecordType

The type of the resource record.

Traits

HttpClient

Generic abstraction over HTTP clients.