pub fn send_async<B: Into<Body>>(&self, request: Request<B>) -> ResponseFuture<'_> {
        let mut request = request.map(Into::into);

        // Set default user agent if not specified.
        request
            .headers_mut()
            .entry(http::header::USER_AGENT)
            .unwrap()
            .or_insert(USER_AGENT.parse().unwrap());

        // Apply any request middleware, starting with the outermost one.
        for middleware in self.middleware.iter().rev() {
            request = middleware.filter_request(request);
        }

        ResponseFuture {
            client: self,
            error: None,
            request: Some(request),
            inner: None,
        }
    }
/// Send an HTTP request and return the HTTP response asynchronously.
///
/// See [`HttpClient::send`] for further details.
///
/// # Examples
///
/// ```ignore
/// use isahc::prelude::*;
///
/// let client = HttpClient::new()?;
///
/// let request = Request::post("https://httpbin.org/post")
///     .header("Content-Type", "application/json")
///     .body(r#"{
///         "speed": "fast",
///         "cool_name": true
///     }"#)?;
///
/// let response = client.send_async(request).await?;
/// assert!(response.status().is_success());
/// ```
Send an HTTP request and return the HTTP response asynchronously.
See [`HttpClient::send`] for further details.
Send an HTTP request and return the HTTP response asynchronously . See [ ` HttpClient :: send ` ] for further details .
pub fn send_async<B: Into<Body>>(&self, request: Request<B>) -> ResponseFuture<'_> {
        let mut request = request.map(Into::into);
        // Set default user agent if not specified.
        request
            .headers_mut()
            .entry(http::header::USER_AGENT)
            .unwrap()
            .or_insert(USER_AGENT.parse().unwrap());
        // Apply any request middleware, starting with the outermost one.
        for middleware in self.middleware.iter().rev() {
            request = middleware.filter_request(request);
        }
        ResponseFuture {
            client: self,
            error: None,
            request: Some(request),
            inner: None,
        }
    }
pub fn send_async < B : Into < Body > > ( & self , request : Request < B > ) -> ResponseFuture < ' _ > { let mut request = request . map ( Into :: into ) ; // Set default user agent if not specified. request . headers_mut ( ) . entry ( http :: header :: USER_AGENT ) . unwrap ( ) . or_insert ( USER_AGENT . parse ( ) . unwrap ( ) ) ; // Apply any request middleware, starting with the outermost one. for middleware in self . middleware . iter ( ) . rev ( ) { request = middleware . filter_request ( request ) ; } ResponseFuture { client : self , error : None , request : Some ( request ) , inner : None , } }
Send an HTTP request and return the HTTP response asynchronously.
Send an HTTP request and return the HTTP response asynchronously .
&self
request
Request<B>
examples
```ignore
use isahc::prelude::*.

let client = HttpClient::new()?.



let response = client.send_async(request).await?;
assert!(response.status().is_success());
```
` ` ` ignore use isahc :: prelude :: * . let client = HttpClient :: new () ? . let response = client . send_async ( request ) . await? ; assert! ( response . status () . is_success () ) ; ` ` `