|
|
@ -198,31 +198,25 @@ pub trait IntoClientRequest { |
|
|
|
|
|
|
|
|
|
|
|
impl<'a> IntoClientRequest for &'a str { |
|
|
|
impl<'a> IntoClientRequest for &'a str { |
|
|
|
fn into_client_request(self) -> Result<Request> { |
|
|
|
fn into_client_request(self) -> Result<Request> { |
|
|
|
let uri: Uri = self.parse()?; |
|
|
|
self.parse::<Uri>()?.into_client_request() |
|
|
|
|
|
|
|
|
|
|
|
Ok(Request::get(uri).body(())?) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
impl<'a> IntoClientRequest for &'a String { |
|
|
|
impl<'a> IntoClientRequest for &'a String { |
|
|
|
fn into_client_request(self) -> Result<Request> { |
|
|
|
fn into_client_request(self) -> Result<Request> { |
|
|
|
let uri: Uri = self.parse()?; |
|
|
|
<&str as IntoClientRequest>::into_client_request(self) |
|
|
|
|
|
|
|
|
|
|
|
Ok(Request::get(uri).body(())?) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
impl IntoClientRequest for String { |
|
|
|
impl IntoClientRequest for String { |
|
|
|
fn into_client_request(self) -> Result<Request> { |
|
|
|
fn into_client_request(self) -> Result<Request> { |
|
|
|
let uri: Uri = self.parse()?; |
|
|
|
<&str as IntoClientRequest>::into_client_request(&self) |
|
|
|
|
|
|
|
|
|
|
|
Ok(Request::get(uri).body(())?) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
impl<'a> IntoClientRequest for &'a Uri { |
|
|
|
impl<'a> IntoClientRequest for &'a Uri { |
|
|
|
fn into_client_request(self) -> Result<Request> { |
|
|
|
fn into_client_request(self) -> Result<Request> { |
|
|
|
Ok(Request::get(self.clone()).body(())?) |
|
|
|
self.clone().into_client_request() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -234,17 +228,13 @@ impl IntoClientRequest for Uri { |
|
|
|
|
|
|
|
|
|
|
|
impl<'a> IntoClientRequest for &'a Url { |
|
|
|
impl<'a> IntoClientRequest for &'a Url { |
|
|
|
fn into_client_request(self) -> Result<Request> { |
|
|
|
fn into_client_request(self) -> Result<Request> { |
|
|
|
let uri: Uri = self.as_str().parse()?; |
|
|
|
self.as_str().into_client_request() |
|
|
|
|
|
|
|
|
|
|
|
Ok(Request::get(uri).body(())?) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
impl IntoClientRequest for Url { |
|
|
|
impl IntoClientRequest for Url { |
|
|
|
fn into_client_request(self) -> Result<Request> { |
|
|
|
fn into_client_request(self) -> Result<Request> { |
|
|
|
let uri: Uri = self.as_str().parse()?; |
|
|
|
self.as_str().into_client_request() |
|
|
|
|
|
|
|
|
|
|
|
Ok(Request::get(uri).body(())?) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|