pub struct HttpClient { /* private fields */ }Implementations§
Source§impl HttpClient
impl HttpClient
pub fn new() -> Self
Sourcepub async fn send(self, request: HttpRequest) -> Result<HttpResponse>
pub async fn send(self, request: HttpRequest) -> Result<HttpResponse>
Sends an HTTP request to the server, automatically selecting the appropriate protocol and transport.
ALPN is used to determine whether to use HTTP/2 or HTTP/1.1 for the request.
Auto Trait Implementations§
impl Freeze for HttpClient
impl !RefUnwindSafe for HttpClient
impl Send for HttpClient
impl Sync for HttpClient
impl Unpin for HttpClient
impl UnsafeUnpin for HttpClient
impl !UnwindSafe 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