pub struct HttpClient { /* private fields */ }Expand description
An asynchronous HTTP client to make Requests with.
Implementations§
Source§impl HttpClient
impl HttpClient
Sourcepub fn request<'a>(
&'a self,
service: &'a Service,
) -> RequestBuilder<'a, DefaultResponseExtractor>
pub fn request<'a>( &'a self, service: &'a Service, ) -> RequestBuilder<'a, DefaultResponseExtractor>
Creates a request that will forward the whole response to the caller.
Note: If you want to avoid reading body buffers in certain situations see the extract_with method.
Trait Implementations§
Source§impl<C> FromContext<C> for HttpClientwhere
Rc<dyn Host>: FromContext<C, Error = Infallible>,
Rc<RootReactor>: FromContext<C, Error = Infallible>,
impl<C> FromContext<C> for HttpClientwhere
Rc<dyn Host>: FromContext<C, Error = Infallible>,
Rc<RootReactor>: FromContext<C, Error = Infallible>,
type Error = Infallible
fn from_context(context: &C) -> Result<Self, Self::Error>
fn from_context_always(context: &C) -> Selfwhere
Self: FromContext<C, E, Error = Infallible>,
Auto Trait Implementations§
impl !RefUnwindSafe for HttpClient
impl !Send for HttpClient
impl !Sync for HttpClient
impl !UnwindSafe for HttpClient
impl Freeze for HttpClient
impl Unpin for HttpClient
impl UnsafeUnpin for HttpClient
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