pub fn new() -> Self {
        let mut defaults = http::Extensions::new();

        // Always start out with latest compatible HTTP version.
        defaults.insert(VersionNegotiation::default());

        // Enable automatic decompression by default for convenience (and
        // maintain backwards compatibility).
        defaults.insert(AutomaticDecompression(true));

        // Erase curl's default auth method of Basic.
        defaults.insert(Authentication::default());

        Self {
            agent_builder: AgentBuilder::default(),
            defaults,
            interceptors: vec![
                // Add redirect support. Note that this is _always_ the first,
                // and thus the outermost, interceptor. Also note that this does
                // not enable redirect following, it just implements support for
                // it, if a request asks for it.
                InterceptorObj::new(crate::redirect::RedirectInterceptor),
            ],
            default_headers: HeaderMap::new(),
            error: None,

            #[cfg(feature = "cookies")]
            cookie_jar: None,
        }
    }
/// Create a new builder for building a custom client. All configuration
/// will start out with the default values.
///
/// This is equivalent to the [`Default`] implementation.
Create a new builder for building a custom client. All configuration
will start out with the default values.

This is equivalent to the [`Default`] implementation.
Create a new builder for building a custom client . All configuration will start out with the default values . This is equivalent to the [ ` Default ` ] implementation .
pub fn new() -> Self {
        let mut defaults = http::Extensions::new();
        // Always start out with latest compatible HTTP version.
        defaults.insert(VersionNegotiation::default());
        // Enable automatic decompression by default for convenience (and
        // maintain backwards compatibility).
        defaults.insert(AutomaticDecompression(true));
        // Erase curl's default auth method of Basic.
        defaults.insert(Authentication::default());
        Self {
            agent_builder: AgentBuilder::default(),
            defaults,
            interceptors: vec![
                // Add redirect support. Note that this is _always_ the first,
                // and thus the outermost, interceptor. Also note that this does
                // not enable redirect following, it just implements support for
                // it, if a request asks for it.
                InterceptorObj::new(crate::redirect::RedirectInterceptor),
            ],
            default_headers: HeaderMap::new(),
            error: None,
            #[cfg(feature = "cookies")]
            cookie_jar: None,
        }
    }
pub fn new ( ) -> Self { let mut defaults = http :: Extensions :: new ( ) ; // Always start out with latest compatible HTTP version. defaults . insert ( VersionNegotiation :: default ( ) ) ; // Enable automatic decompression by default for convenience (and // maintain backwards compatibility). defaults . insert ( AutomaticDecompression ( true ) ) ; // Erase curl's default auth method of Basic. defaults . insert ( Authentication :: default ( ) ) ; Self { agent_builder : AgentBuilder :: default ( ) , defaults , interceptors : vec ! [ // Add redirect support. Note that this is _always_ the first, // and thus the outermost, interceptor. Also note that this does // not enable redirect following, it just implements support for // it, if a request asks for it. InterceptorObj new ( crate redirect RedirectInterceptor ) ] , default_headers : HeaderMap :: new ( ) , error : None , # [ cfg ( feature " " ) ] cookie_jar : None , } }
Create a new builder for building a custom client.
Create a new builder for building a custom client .