pub struct UreqHttpClient { /* private fields */ }Expand description
HTTP client implementation using ureq for synchronous HTTP requests.
Since ureq is blocking, all requests are wrapped in tokio::task::spawn_blocking.
Implementations§
Trait Implementations§
Source§impl Clone for UreqHttpClient
impl Clone for UreqHttpClient
Source§fn clone(&self) -> UreqHttpClient
fn clone(&self) -> UreqHttpClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UreqHttpClient
impl Debug for UreqHttpClient
Source§impl Default for UreqHttpClient
impl Default for UreqHttpClient
Source§impl HttpClient for UreqHttpClient
impl HttpClient for UreqHttpClient
Source§fn execute<'life0, 'async_trait>(
&'life0 self,
request: HttpRequest,
) -> Pin<Box<dyn Future<Output = Result<HttpResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait>(
&'life0 self,
request: HttpRequest,
) -> Pin<Box<dyn Future<Output = Result<HttpResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Executes a given HTTP request and returns the response.
Source§fn execute_streaming(
&self,
request: HttpRequest,
) -> Result<StreamingHttpResponse>
fn execute_streaming( &self, request: HttpRequest, ) -> Result<StreamingHttpResponse>
Synchronous streaming variant. Returns a reader over the response body
instead of buffering it all in memory. Read more
Auto Trait Implementations§
impl Freeze for UreqHttpClient
impl !RefUnwindSafe for UreqHttpClient
impl Send for UreqHttpClient
impl Sync for UreqHttpClient
impl Unpin for UreqHttpClient
impl UnsafeUnpin for UreqHttpClient
impl !UnwindSafe for UreqHttpClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more