pub struct HttpClient { /* private fields */ }Expand description
Shared outbound HTTP handle stored in app state.
Implementations§
Source§impl HttpClient
impl HttpClient
pub fn transport(&self) -> &Arc<dyn Transport> ⓘ
pub fn fake(&self) -> Option<&FakeTransport>
pub fn request(&self, method: Method, url: impl Into<String>) -> PendingRequest
pub fn get(&self, url: impl Into<String>) -> PendingRequest
pub fn post(&self, url: impl Into<String>) -> PendingRequest
pub fn put(&self, url: impl Into<String>) -> PendingRequest
pub fn patch(&self, url: impl Into<String>) -> PendingRequest
pub fn delete(&self, url: impl Into<String>) -> PendingRequest
pub fn named(&self, name: &str) -> NamedClient
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for HttpClient
impl !UnwindSafe for HttpClient
impl Freeze for HttpClient
impl Send for HttpClient
impl Sync 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