uses hyper-proxy 0.3.0

This commit is contained in:
Johann Tuffe
2017-12-19 15:23:39 +08:00
parent 07f89984c4
commit 2f403175dc
4 changed files with 7 additions and 13 deletions

View File

@@ -100,13 +100,8 @@ impl Proxy {
/// # fn run() -> Result<(), Box<::std::error::Error>> {
/// let target = reqwest::Url::parse("https://my.prox")?;
/// let client = reqwest::Client::builder()
/// .proxy(reqwest::Proxy::custom(move |url| {
/// if url.host_str() == Some("hyper.rs") {
/// Some(target.clone())
/// } else {
/// None
/// }
/// }))
/// .proxy(reqwest::Proxy::custom(|url| url.host() == Some("hyper.rs"),
/// "http://proxy.custom")?)
/// .build()?;
/// # Ok(())
/// # }