add a Proxy type

Proxies can currently be configured to intercept HTTP, HTTPS, and all
requests. HTTPS tunneling is supported.

Closes #30
This commit is contained in:
Sean McArthur
2017-05-02 16:45:27 -07:00
parent a25b9a6002
commit 6cdaff4b66
8 changed files with 481 additions and 16 deletions

View File

@@ -32,3 +32,7 @@ impl<'a> PolyfillTryInto for &'a String {
Url::parse(self)
}
}
pub fn to_uri(url: &Url) -> ::hyper::Uri {
url.as_str().parse().expect("a parsed Url should always be a valid Uri")
}