pub fn send(self) -> Result<Response, Error> {
        let parsed_request = ParsedRequest::new(self)?;
        if parsed_request.https {
            #[cfg(any(feature = "rustls", feature = "openssl", feature = "native-tls"))]
            {
                let is_head = parsed_request.config.method == Method::Head;
                let response = Connection::new(parsed_request).send_https()?;
                Response::create(response, is_head)
            }
            #[cfg(not(any(feature = "rustls", feature = "openssl", feature = "native-tls")))]
            {
                Err(Error::HttpsFeatureNotEnabled)
            }
        } else {
            let is_head = parsed_request.config.method == Method::Head;
            let response = Connection::new(parsed_request).send()?;
            Response::create(response, is_head)
        }
    }
/// Sends this request to the host.
///
/// # Errors
///
/// Returns `Err` if we run into an error while sending the
/// request, or receiving/parsing the response. The specific error
/// is described in the `Err`, and it can be any
/// [`minreq::Error`](enum.Error.html) except
/// [`SerdeJsonError`](enum.Error.html#variant.SerdeJsonError) and
/// [`InvalidUtf8InBody`](enum.Error.html#variant.InvalidUtf8InBody).
Sends this request to the host.
Sends this request to the host .
pub fn send(self) -> Result<Response, Error> {
        let parsed_request = ParsedRequest::new(self)?;
        if parsed_request.https {
            #[cfg(any(feature = "rustls", feature = "openssl", feature = "native-tls"))]
            {
                let is_head = parsed_request.config.method == Method::Head;
                let response = Connection::new(parsed_request).send_https()?;
                Response::create(response, is_head)
            }
            #[cfg(not(any(feature = "rustls", feature = "openssl", feature = "native-tls")))]
            {
                Err(Error::HttpsFeatureNotEnabled)
            }
        } else {
            let is_head = parsed_request.config.method == Method::Head;
            let response = Connection::new(parsed_request).send()?;
            Response::create(response, is_head)
        }
    }
pub fn send ( self ) -> Result < Response , Error > { let parsed_request = ParsedRequest :: new ( self ) ? ; if parsed_request . https { # [ cfg ( any ( feature " " feature " " feature " " ) ) ] { let is_head = parsed_request . config . method == Method :: Head ; let response = Connection :: new ( parsed_request ) . send_https ( ) ? ; Response :: create ( response , is_head ) } # [ cfg ( not ( any ( feature " " feature " " feature " " ) ) ) ] { Err ( Error :: HttpsFeatureNotEnabled ) } } else { let is_head = parsed_request . config . method == Method :: Head ; let response = Connection :: new ( parsed_request ) . send ( ) ? ; Response :: create ( response , is_head ) } }
Sends this request to the host.
Sends this request to the host .
self
self
errors
Returns `Err` if we run into an error while sending the
request, or receiving/parsing the response. The specific error
is described in the `Err`, and it can be any
[`minreq::Error`](enum.Error.html) except
[`SerdeJsonError`](enum.Error.html#variant.SerdeJsonError) and
[`InvalidUtf8InBody`](enum.Error.html#variant.InvalidUtf8InBody).
Returns ` Err ` if we run into an error while sending the request or receiving / parsing the response . The specific error is described in the ` Err ` and it can be any [ ` minreq :: Error ` ] ( enum . Error . html ) except [ ` SerdeJsonError ` ] ( enum . Error . html#variant . SerdeJsonError ) and [ ` InvalidUtf8InBody ` ] ( enum . Error . html#variant . InvalidUtf8InBody ) .