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.
Trait Implementations
Auto Trait Implementations
impl<TSigner> !RefUnwindSafe for Client<TSigner>
impl<TSigner> Send for Client<TSigner> where
TSigner: Send,
impl<TSigner> Sync for Client<TSigner> where
TSigner: Sync,
impl<TSigner> Unpin for Client<TSigner> where
TSigner: Unpin,
impl<TSigner> !UnwindSafe for Client<TSigner>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more