Struct reqwest_oauth1::Client
source · [−]pub struct Client<TSigner> { /* private fields */ }
Expand description
Compatible interface with reqwest’s Client
.
Implementations
sourceimpl Client<()>
impl Client<()>
sourcepub fn new() -> Self
pub fn new() -> Self
Constructs a new Client
.
This method calls reqwest::Client::new() internally.
sourcepub fn new_with_client(client: ReqwestClient) -> Self
pub fn new_with_client(client: ReqwestClient) -> Self
Constructs a new Client
with specifying inner reqwest::Client
.
sourceimpl<T> Client<T>where
T: Clone,
impl<T> Client<T>where
T: Clone,
sourcepub fn get<U: IntoUrl + Clone>(&self, url: U) -> RequestBuilder<T>
pub fn get<U: IntoUrl + Clone>(&self, url: U) -> RequestBuilder<T>
Convenience method to make a GET
request to a URL.
Errors
This method fails whenever supplied Url
cannot be parsed.
sourcepub fn post<U: IntoUrl + Clone>(&self, url: U) -> RequestBuilder<T>
pub fn post<U: IntoUrl + Clone>(&self, url: U) -> RequestBuilder<T>
Convenience method to make a POST
request to a URL.
Errors
This method fails whenever supplied Url
cannot be parsed.
sourcepub fn put<U: IntoUrl + Clone>(&self, url: U) -> RequestBuilder<T>
pub fn put<U: IntoUrl + Clone>(&self, url: U) -> RequestBuilder<T>
Convenience method to make a PUT
request to a URL.
Errors
This method fails whenever supplied Url
cannot be parsed.
sourcepub fn patch<U: IntoUrl + Clone>(&self, url: U) -> RequestBuilder<T>
pub fn patch<U: IntoUrl + Clone>(&self, url: U) -> RequestBuilder<T>
Convenience method to make a PATCH
request to a URL.
Errors
This method fails whenever supplied Url
cannot be parsed.
sourcepub fn delete<U: IntoUrl + Clone>(&self, url: U) -> RequestBuilder<T>
pub fn delete<U: IntoUrl + Clone>(&self, url: U) -> RequestBuilder<T>
Convenience method to make a DELETE
request to a URL.
Errors
This method fails whenever supplied Url
cannot be parsed.
sourcepub fn head<U: IntoUrl + Clone>(&self, url: U) -> RequestBuilder<T>
pub fn head<U: IntoUrl + Clone>(&self, url: U) -> RequestBuilder<T>
Convenience method to make a HEAD
request to a URL.
Errors
This method fails whenever supplied Url
cannot be parsed.
sourcepub fn request<U: IntoUrl + Clone>(
&self,
method: Method,
url: U
) -> RequestBuilder<T>
pub fn request<U: IntoUrl + Clone>(
&self,
method: Method,
url: U
) -> RequestBuilder<T>
Start building a Request
with the Method
and Url
.
Returns a RequestBuilder<T>
, which will allow setting headers and
request body before sending.
Errors
This method fails whenever supplied Url
cannot be parsed.