Remove proxy method on request (#220)

This commit is contained in:
Jacob Hoffman-Andrews
2020-11-12 23:25:05 -08:00
committed by GitHub
parent d6f31ebb52
commit 920eccf37a
3 changed files with 2 additions and 11 deletions

View File

@@ -9,7 +9,6 @@ use crate::body::BodySize;
use crate::body::{Payload, SizedReader};
use crate::error::Error;
use crate::header::{self, Header};
use crate::proxy::Proxy;
use crate::unit::{self, Unit};
use crate::Response;
@@ -419,14 +418,6 @@ impl Request {
Url::parse(&self.url).map_err(|e| Error::BadUrl(format!("{}", e)))
}
pub(crate) fn proxy(&self) -> Option<Proxy> {
if let Some(proxy) = &self.agent.config.proxy {
Some(proxy.clone())
} else {
None
}
}
// Returns true if this request, with the provided body, is retryable.
pub(crate) fn is_retryable(&self, body: &SizedReader) -> bool {
// Per https://tools.ietf.org/html/rfc7231#section-8.1.3