Client Test

Client Test

rev. 3c756f73b1f83a0eed4275d9d1e22df0b10b66fb

Files changed:

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/endpoint_operation.rs

@@ -151,151 +221,221 @@
  171    171   
                _input: &crate::operation::endpoint_operation::EndpointOperationInput,
  172    172   
                output: &mut ::std::string::String,
  173    173   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  174    174   
                use ::std::fmt::Write as _;
  175    175   
                ::std::write!(output, "/").expect("formatting should succeed");
  176    176   
                ::std::result::Result::Ok(())
  177    177   
            }
  178    178   
            #[allow(clippy::unnecessary_wraps)]
  179    179   
            fn update_http_builder(
  180    180   
                input: &crate::operation::endpoint_operation::EndpointOperationInput,
  181         -
                builder: ::http::request::Builder,
  182         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         181  +
                builder: ::http_1x::request::Builder,
         182  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  183    183   
                let mut uri = ::std::string::String::new();
  184    184   
                uri_base(input, &mut uri)?;
  185    185   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  186    186   
            }
  187         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  188         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-amz-json-1.1");
         187  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         188  +
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  189    189   
            builder = _header_serialization_settings.set_default_header(
  190    190   
                builder,
  191         -
                ::http::header::HeaderName::from_static("x-amz-target"),
         191  +
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  192    192   
                "JsonProtocol.EndpointOperation",
  193    193   
            );
  194    194   
            builder
  195    195   
        };
  196    196   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_endpoint_operation::ser_endpoint_operation_input(&input)?);
  197    197   
  198    198   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  199    199   
    }
  200    200   
}
  201    201   
#[derive(Debug)]

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/endpoint_with_host_label_operation.rs

@@ -159,159 +239,239 @@
  179    179   
                _input: &crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationInput,
  180    180   
                output: &mut ::std::string::String,
  181    181   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  182    182   
                use ::std::fmt::Write as _;
  183    183   
                ::std::write!(output, "/").expect("formatting should succeed");
  184    184   
                ::std::result::Result::Ok(())
  185    185   
            }
  186    186   
            #[allow(clippy::unnecessary_wraps)]
  187    187   
            fn update_http_builder(
  188    188   
                input: &crate::operation::endpoint_with_host_label_operation::EndpointWithHostLabelOperationInput,
  189         -
                builder: ::http::request::Builder,
  190         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         189  +
                builder: ::http_1x::request::Builder,
         190  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  191    191   
                let mut uri = ::std::string::String::new();
  192    192   
                uri_base(input, &mut uri)?;
  193    193   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  194    194   
            }
  195         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  196         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-amz-json-1.1");
         195  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         196  +
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  197    197   
            builder = _header_serialization_settings.set_default_header(
  198    198   
                builder,
  199         -
                ::http::header::HeaderName::from_static("x-amz-target"),
         199  +
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  200    200   
                "JsonProtocol.EndpointWithHostLabelOperation",
  201    201   
            );
  202    202   
            builder
  203    203   
        };
  204    204   
        let body = ::aws_smithy_types::body::SdkBody::from(
  205    205   
            crate::protocol_serde::shape_endpoint_with_host_label_operation::ser_endpoint_with_host_label_operation_input(&input)?,
  206    206   
        );
  207    207   
        if let Some(content_length) = body.content_length() {
  208    208   
            let content_length = content_length.to_string();
  209         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
         209  +
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  210    210   
        }
  211    211   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  212    212   
    }
  213    213   
}
  214    214   
#[derive(Debug)]
  215    215   
struct EndpointWithHostLabelOperationEndpointParamsInterceptor;
  216    216   
  217    217   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for EndpointWithHostLabelOperationEndpointParamsInterceptor {
  218    218   
    fn name(&self) -> &'static str {
  219    219   
        "EndpointWithHostLabelOperationEndpointParamsInterceptor"

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/fractional_seconds.rs

@@ -151,151 +221,221 @@
  171    171   
                _input: &crate::operation::fractional_seconds::FractionalSecondsInput,
  172    172   
                output: &mut ::std::string::String,
  173    173   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  174    174   
                use ::std::fmt::Write as _;
  175    175   
                ::std::write!(output, "/").expect("formatting should succeed");
  176    176   
                ::std::result::Result::Ok(())
  177    177   
            }
  178    178   
            #[allow(clippy::unnecessary_wraps)]
  179    179   
            fn update_http_builder(
  180    180   
                input: &crate::operation::fractional_seconds::FractionalSecondsInput,
  181         -
                builder: ::http::request::Builder,
  182         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         181  +
                builder: ::http_1x::request::Builder,
         182  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  183    183   
                let mut uri = ::std::string::String::new();
  184    184   
                uri_base(input, &mut uri)?;
  185    185   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  186    186   
            }
  187         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  188         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-amz-json-1.1");
         187  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         188  +
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  189    189   
            builder = _header_serialization_settings.set_default_header(
  190    190   
                builder,
  191         -
                ::http::header::HeaderName::from_static("x-amz-target"),
         191  +
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  192    192   
                "JsonProtocol.FractionalSeconds",
  193    193   
            );
  194    194   
            builder
  195    195   
        };
  196    196   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_fractional_seconds::ser_fractional_seconds_input(&input)?);
  197    197   
  198    198   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  199    199   
    }
  200    200   
}
  201    201   
#[derive(Debug)]

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/greeting_with_errors.rs

@@ -151,151 +221,221 @@
  171    171   
                _input: &crate::operation::greeting_with_errors::GreetingWithErrorsInput,
  172    172   
                output: &mut ::std::string::String,
  173    173   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  174    174   
                use ::std::fmt::Write as _;
  175    175   
                ::std::write!(output, "/").expect("formatting should succeed");
  176    176   
                ::std::result::Result::Ok(())
  177    177   
            }
  178    178   
            #[allow(clippy::unnecessary_wraps)]
  179    179   
            fn update_http_builder(
  180    180   
                input: &crate::operation::greeting_with_errors::GreetingWithErrorsInput,
  181         -
                builder: ::http::request::Builder,
  182         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         181  +
                builder: ::http_1x::request::Builder,
         182  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  183    183   
                let mut uri = ::std::string::String::new();
  184    184   
                uri_base(input, &mut uri)?;
  185    185   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  186    186   
            }
  187         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  188         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-amz-json-1.1");
         187  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         188  +
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  189    189   
            builder = _header_serialization_settings.set_default_header(
  190    190   
                builder,
  191         -
                ::http::header::HeaderName::from_static("x-amz-target"),
         191  +
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  192    192   
                "JsonProtocol.GreetingWithErrors",
  193    193   
            );
  194    194   
            builder
  195    195   
        };
  196    196   
        let body =
  197    197   
            ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_greeting_with_errors::ser_greeting_with_errors_input(&input)?);
  198    198   
  199    199   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  200    200   
    }
  201    201   
}

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/host_with_path_operation.rs

@@ -157,157 +227,227 @@
  177    177   
                _input: &crate::operation::host_with_path_operation::HostWithPathOperationInput,
  178    178   
                output: &mut ::std::string::String,
  179    179   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  180    180   
                use ::std::fmt::Write as _;
  181    181   
                ::std::write!(output, "/").expect("formatting should succeed");
  182    182   
                ::std::result::Result::Ok(())
  183    183   
            }
  184    184   
            #[allow(clippy::unnecessary_wraps)]
  185    185   
            fn update_http_builder(
  186    186   
                input: &crate::operation::host_with_path_operation::HostWithPathOperationInput,
  187         -
                builder: ::http::request::Builder,
  188         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         187  +
                builder: ::http_1x::request::Builder,
         188  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  189    189   
                let mut uri = ::std::string::String::new();
  190    190   
                uri_base(input, &mut uri)?;
  191    191   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  192    192   
            }
  193         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  194         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-amz-json-1.1");
         193  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         194  +
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  195    195   
            builder = _header_serialization_settings.set_default_header(
  196    196   
                builder,
  197         -
                ::http::header::HeaderName::from_static("x-amz-target"),
         197  +
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  198    198   
                "JsonProtocol.HostWithPathOperation",
  199    199   
            );
  200    200   
            builder
  201    201   
        };
  202    202   
        let body = ::aws_smithy_types::body::SdkBody::from(
  203    203   
            crate::protocol_serde::shape_host_with_path_operation::ser_host_with_path_operation_input(&input)?,
  204    204   
        );
  205    205   
  206    206   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  207    207   
    }

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/json_enums.rs

@@ -149,149 +227,227 @@
  169    169   
                _input: &crate::operation::json_enums::JsonEnumsInput,
  170    170   
                output: &mut ::std::string::String,
  171    171   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  172    172   
                use ::std::fmt::Write as _;
  173    173   
                ::std::write!(output, "/").expect("formatting should succeed");
  174    174   
                ::std::result::Result::Ok(())
  175    175   
            }
  176    176   
            #[allow(clippy::unnecessary_wraps)]
  177    177   
            fn update_http_builder(
  178    178   
                input: &crate::operation::json_enums::JsonEnumsInput,
  179         -
                builder: ::http::request::Builder,
  180         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         179  +
                builder: ::http_1x::request::Builder,
         180  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  181    181   
                let mut uri = ::std::string::String::new();
  182    182   
                uri_base(input, &mut uri)?;
  183    183   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  184    184   
            }
  185         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  186         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-amz-json-1.1");
         185  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         186  +
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  187    187   
            builder = _header_serialization_settings.set_default_header(
  188    188   
                builder,
  189         -
                ::http::header::HeaderName::from_static("x-amz-target"),
         189  +
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  190    190   
                "JsonProtocol.JsonEnums",
  191    191   
            );
  192    192   
            builder
  193    193   
        };
  194    194   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_json_enums::ser_json_enums_input(&input)?);
  195    195   
        if let Some(content_length) = body.content_length() {
  196    196   
            let content_length = content_length.to_string();
  197         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
         197  +
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  198    198   
        }
  199    199   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  200    200   
    }
  201    201   
}
  202    202   
#[derive(Debug)]
  203    203   
struct JsonEnumsEndpointParamsInterceptor;
  204    204   
  205    205   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for JsonEnumsEndpointParamsInterceptor {
  206    206   
    fn name(&self) -> &'static str {
  207    207   
        "JsonEnumsEndpointParamsInterceptor"

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/json_int_enums.rs

@@ -151,151 +229,229 @@
  171    171   
                _input: &crate::operation::json_int_enums::JsonIntEnumsInput,
  172    172   
                output: &mut ::std::string::String,
  173    173   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  174    174   
                use ::std::fmt::Write as _;
  175    175   
                ::std::write!(output, "/").expect("formatting should succeed");
  176    176   
                ::std::result::Result::Ok(())
  177    177   
            }
  178    178   
            #[allow(clippy::unnecessary_wraps)]
  179    179   
            fn update_http_builder(
  180    180   
                input: &crate::operation::json_int_enums::JsonIntEnumsInput,
  181         -
                builder: ::http::request::Builder,
  182         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         181  +
                builder: ::http_1x::request::Builder,
         182  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  183    183   
                let mut uri = ::std::string::String::new();
  184    184   
                uri_base(input, &mut uri)?;
  185    185   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  186    186   
            }
  187         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  188         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-amz-json-1.1");
         187  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         188  +
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  189    189   
            builder = _header_serialization_settings.set_default_header(
  190    190   
                builder,
  191         -
                ::http::header::HeaderName::from_static("x-amz-target"),
         191  +
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  192    192   
                "JsonProtocol.JsonIntEnums",
  193    193   
            );
  194    194   
            builder
  195    195   
        };
  196    196   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_json_int_enums::ser_json_int_enums_input(&input)?);
  197    197   
        if let Some(content_length) = body.content_length() {
  198    198   
            let content_length = content_length.to_string();
  199         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
         199  +
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  200    200   
        }
  201    201   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  202    202   
    }
  203    203   
}
  204    204   
#[derive(Debug)]
  205    205   
struct JsonIntEnumsEndpointParamsInterceptor;
  206    206   
  207    207   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for JsonIntEnumsEndpointParamsInterceptor {
  208    208   
    fn name(&self) -> &'static str {
  209    209   
        "JsonIntEnumsEndpointParamsInterceptor"

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/json_unions.rs

@@ -149,149 +227,227 @@
  169    169   
                _input: &crate::operation::json_unions::JsonUnionsInput,
  170    170   
                output: &mut ::std::string::String,
  171    171   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  172    172   
                use ::std::fmt::Write as _;
  173    173   
                ::std::write!(output, "/").expect("formatting should succeed");
  174    174   
                ::std::result::Result::Ok(())
  175    175   
            }
  176    176   
            #[allow(clippy::unnecessary_wraps)]
  177    177   
            fn update_http_builder(
  178    178   
                input: &crate::operation::json_unions::JsonUnionsInput,
  179         -
                builder: ::http::request::Builder,
  180         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         179  +
                builder: ::http_1x::request::Builder,
         180  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  181    181   
                let mut uri = ::std::string::String::new();
  182    182   
                uri_base(input, &mut uri)?;
  183    183   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  184    184   
            }
  185         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  186         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-amz-json-1.1");
         185  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         186  +
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  187    187   
            builder = _header_serialization_settings.set_default_header(
  188    188   
                builder,
  189         -
                ::http::header::HeaderName::from_static("x-amz-target"),
         189  +
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  190    190   
                "JsonProtocol.JsonUnions",
  191    191   
            );
  192    192   
            builder
  193    193   
        };
  194    194   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_json_unions::ser_json_unions_input(&input)?);
  195    195   
        if let Some(content_length) = body.content_length() {
  196    196   
            let content_length = content_length.to_string();
  197         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
         197  +
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  198    198   
        }
  199    199   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  200    200   
    }
  201    201   
}
  202    202   
#[derive(Debug)]
  203    203   
struct JsonUnionsEndpointParamsInterceptor;
  204    204   
  205    205   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for JsonUnionsEndpointParamsInterceptor {
  206    206   
    fn name(&self) -> &'static str {
  207    207   
        "JsonUnionsEndpointParamsInterceptor"

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/kitchen_sink_operation.rs

@@ -157,157 +237,237 @@
  177    177   
                _input: &crate::operation::kitchen_sink_operation::KitchenSinkOperationInput,
  178    178   
                output: &mut ::std::string::String,
  179    179   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  180    180   
                use ::std::fmt::Write as _;
  181    181   
                ::std::write!(output, "/").expect("formatting should succeed");
  182    182   
                ::std::result::Result::Ok(())
  183    183   
            }
  184    184   
            #[allow(clippy::unnecessary_wraps)]
  185    185   
            fn update_http_builder(
  186    186   
                input: &crate::operation::kitchen_sink_operation::KitchenSinkOperationInput,
  187         -
                builder: ::http::request::Builder,
  188         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         187  +
                builder: ::http_1x::request::Builder,
         188  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  189    189   
                let mut uri = ::std::string::String::new();
  190    190   
                uri_base(input, &mut uri)?;
  191    191   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  192    192   
            }
  193         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  194         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-amz-json-1.1");
         193  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         194  +
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  195    195   
            builder = _header_serialization_settings.set_default_header(
  196    196   
                builder,
  197         -
                ::http::header::HeaderName::from_static("x-amz-target"),
         197  +
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  198    198   
                "JsonProtocol.KitchenSinkOperation",
  199    199   
            );
  200    200   
            builder
  201    201   
        };
  202    202   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_kitchen_sink_operation::ser_kitchen_sink_operation_input(
  203    203   
            &input,
  204    204   
        )?);
  205    205   
        if let Some(content_length) = body.content_length() {
  206    206   
            let content_length = content_length.to_string();
  207         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
         207  +
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  208    208   
        }
  209    209   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  210    210   
    }
  211    211   
}
  212    212   
#[derive(Debug)]
  213    213   
struct KitchenSinkOperationEndpointParamsInterceptor;
  214    214   
  215    215   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for KitchenSinkOperationEndpointParamsInterceptor {
  216    216   
    fn name(&self) -> &'static str {
  217    217   
        "KitchenSinkOperationEndpointParamsInterceptor"

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/null_operation.rs

@@ -151,151 +229,229 @@
  171    171   
                _input: &crate::operation::null_operation::NullOperationInput,
  172    172   
                output: &mut ::std::string::String,
  173    173   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  174    174   
                use ::std::fmt::Write as _;
  175    175   
                ::std::write!(output, "/").expect("formatting should succeed");
  176    176   
                ::std::result::Result::Ok(())
  177    177   
            }
  178    178   
            #[allow(clippy::unnecessary_wraps)]
  179    179   
            fn update_http_builder(
  180    180   
                input: &crate::operation::null_operation::NullOperationInput,
  181         -
                builder: ::http::request::Builder,
  182         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         181  +
                builder: ::http_1x::request::Builder,
         182  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  183    183   
                let mut uri = ::std::string::String::new();
  184    184   
                uri_base(input, &mut uri)?;
  185    185   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  186    186   
            }
  187         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  188         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-amz-json-1.1");
         187  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         188  +
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  189    189   
            builder = _header_serialization_settings.set_default_header(
  190    190   
                builder,
  191         -
                ::http::header::HeaderName::from_static("x-amz-target"),
         191  +
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  192    192   
                "JsonProtocol.NullOperation",
  193    193   
            );
  194    194   
            builder
  195    195   
        };
  196    196   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_null_operation::ser_null_operation_input(&input)?);
  197    197   
        if let Some(content_length) = body.content_length() {
  198    198   
            let content_length = content_length.to_string();
  199         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
         199  +
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  200    200   
        }
  201    201   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  202    202   
    }
  203    203   
}
  204    204   
#[derive(Debug)]
  205    205   
struct NullOperationEndpointParamsInterceptor;
  206    206   
  207    207   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for NullOperationEndpointParamsInterceptor {
  208    208   
    fn name(&self) -> &'static str {
  209    209   
        "NullOperationEndpointParamsInterceptor"

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/operation_with_optional_input_output.rs

@@ -161,161 +241,241 @@
  181    181   
                _input: &crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputInput,
  182    182   
                output: &mut ::std::string::String,
  183    183   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  184    184   
                use ::std::fmt::Write as _;
  185    185   
                ::std::write!(output, "/").expect("formatting should succeed");
  186    186   
                ::std::result::Result::Ok(())
  187    187   
            }
  188    188   
            #[allow(clippy::unnecessary_wraps)]
  189    189   
            fn update_http_builder(
  190    190   
                input: &crate::operation::operation_with_optional_input_output::OperationWithOptionalInputOutputInput,
  191         -
                builder: ::http::request::Builder,
  192         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         191  +
                builder: ::http_1x::request::Builder,
         192  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  193    193   
                let mut uri = ::std::string::String::new();
  194    194   
                uri_base(input, &mut uri)?;
  195    195   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  196    196   
            }
  197         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  198         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-amz-json-1.1");
         197  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         198  +
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  199    199   
            builder = _header_serialization_settings.set_default_header(
  200    200   
                builder,
  201         -
                ::http::header::HeaderName::from_static("x-amz-target"),
         201  +
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  202    202   
                "JsonProtocol.OperationWithOptionalInputOutput",
  203    203   
            );
  204    204   
            builder
  205    205   
        };
  206    206   
        let body = ::aws_smithy_types::body::SdkBody::from(
  207    207   
            crate::protocol_serde::shape_operation_with_optional_input_output::ser_operation_with_optional_input_output_input(&input)?,
  208    208   
        );
  209    209   
        if let Some(content_length) = body.content_length() {
  210    210   
            let content_length = content_length.to_string();
  211         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
         211  +
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  212    212   
        }
  213    213   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  214    214   
    }
  215    215   
}
  216    216   
#[derive(Debug)]
  217    217   
struct OperationWithOptionalInputOutputEndpointParamsInterceptor;
  218    218   
  219    219   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for OperationWithOptionalInputOutputEndpointParamsInterceptor {
  220    220   
    fn name(&self) -> &'static str {
  221    221   
        "OperationWithOptionalInputOutputEndpointParamsInterceptor"

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/put_and_get_inline_documents.rs

@@ -157,157 +237,237 @@
  177    177   
                _input: &crate::operation::put_and_get_inline_documents::PutAndGetInlineDocumentsInput,
  178    178   
                output: &mut ::std::string::String,
  179    179   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  180    180   
                use ::std::fmt::Write as _;
  181    181   
                ::std::write!(output, "/").expect("formatting should succeed");
  182    182   
                ::std::result::Result::Ok(())
  183    183   
            }
  184    184   
            #[allow(clippy::unnecessary_wraps)]
  185    185   
            fn update_http_builder(
  186    186   
                input: &crate::operation::put_and_get_inline_documents::PutAndGetInlineDocumentsInput,
  187         -
                builder: ::http::request::Builder,
  188         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         187  +
                builder: ::http_1x::request::Builder,
         188  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  189    189   
                let mut uri = ::std::string::String::new();
  190    190   
                uri_base(input, &mut uri)?;
  191    191   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  192    192   
            }
  193         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  194         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-amz-json-1.1");
         193  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         194  +
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  195    195   
            builder = _header_serialization_settings.set_default_header(
  196    196   
                builder,
  197         -
                ::http::header::HeaderName::from_static("x-amz-target"),
         197  +
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  198    198   
                "JsonProtocol.PutAndGetInlineDocuments",
  199    199   
            );
  200    200   
            builder
  201    201   
        };
  202    202   
        let body = ::aws_smithy_types::body::SdkBody::from(
  203    203   
            crate::protocol_serde::shape_put_and_get_inline_documents::ser_put_and_get_inline_documents_input(&input)?,
  204    204   
        );
  205    205   
        if let Some(content_length) = body.content_length() {
  206    206   
            let content_length = content_length.to_string();
  207         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
         207  +
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  208    208   
        }
  209    209   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  210    210   
    }
  211    211   
}
  212    212   
#[derive(Debug)]
  213    213   
struct PutAndGetInlineDocumentsEndpointParamsInterceptor;
  214    214   
  215    215   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for PutAndGetInlineDocumentsEndpointParamsInterceptor {
  216    216   
    fn name(&self) -> &'static str {
  217    217   
        "PutAndGetInlineDocumentsEndpointParamsInterceptor"

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/put_with_content_encoding.rs

@@ -157,157 +237,237 @@
  177    177   
                _input: &crate::operation::put_with_content_encoding::PutWithContentEncodingInput,
  178    178   
                output: &mut ::std::string::String,
  179    179   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  180    180   
                use ::std::fmt::Write as _;
  181    181   
                ::std::write!(output, "/").expect("formatting should succeed");
  182    182   
                ::std::result::Result::Ok(())
  183    183   
            }
  184    184   
            #[allow(clippy::unnecessary_wraps)]
  185    185   
            fn update_http_builder(
  186    186   
                input: &crate::operation::put_with_content_encoding::PutWithContentEncodingInput,
  187         -
                builder: ::http::request::Builder,
  188         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         187  +
                builder: ::http_1x::request::Builder,
         188  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  189    189   
                let mut uri = ::std::string::String::new();
  190    190   
                uri_base(input, &mut uri)?;
  191    191   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  192    192   
            }
  193         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  194         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-amz-json-1.1");
         193  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         194  +
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  195    195   
            builder = _header_serialization_settings.set_default_header(
  196    196   
                builder,
  197         -
                ::http::header::HeaderName::from_static("x-amz-target"),
         197  +
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  198    198   
                "JsonProtocol.PutWithContentEncoding",
  199    199   
            );
  200    200   
            builder
  201    201   
        };
  202    202   
        let body = ::aws_smithy_types::body::SdkBody::from(
  203    203   
            crate::protocol_serde::shape_put_with_content_encoding::ser_put_with_content_encoding_input(&input)?,
  204    204   
        );
  205    205   
        if let Some(content_length) = body.content_length() {
  206    206   
            let content_length = content_length.to_string();
  207         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
         207  +
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  208    208   
        }
  209    209   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  210    210   
    }
  211    211   
}
  212    212   
#[derive(Debug)]
  213    213   
struct PutWithContentEncodingEndpointParamsInterceptor;
  214    214   
  215    215   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for PutWithContentEncodingEndpointParamsInterceptor {
  216    216   
    fn name(&self) -> &'static str {
  217    217   
        "PutWithContentEncodingEndpointParamsInterceptor"

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/simple_scalar_properties.rs

@@ -157,157 +237,237 @@
  177    177   
                _input: &crate::operation::simple_scalar_properties::SimpleScalarPropertiesInput,
  178    178   
                output: &mut ::std::string::String,
  179    179   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  180    180   
                use ::std::fmt::Write as _;
  181    181   
                ::std::write!(output, "/").expect("formatting should succeed");
  182    182   
                ::std::result::Result::Ok(())
  183    183   
            }
  184    184   
            #[allow(clippy::unnecessary_wraps)]
  185    185   
            fn update_http_builder(
  186    186   
                input: &crate::operation::simple_scalar_properties::SimpleScalarPropertiesInput,
  187         -
                builder: ::http::request::Builder,
  188         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         187  +
                builder: ::http_1x::request::Builder,
         188  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  189    189   
                let mut uri = ::std::string::String::new();
  190    190   
                uri_base(input, &mut uri)?;
  191    191   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  192    192   
            }
  193         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  194         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-amz-json-1.1");
         193  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         194  +
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  195    195   
            builder = _header_serialization_settings.set_default_header(
  196    196   
                builder,
  197         -
                ::http::header::HeaderName::from_static("x-amz-target"),
         197  +
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  198    198   
                "JsonProtocol.SimpleScalarProperties",
  199    199   
            );
  200    200   
            builder
  201    201   
        };
  202    202   
        let body = ::aws_smithy_types::body::SdkBody::from(
  203    203   
            crate::protocol_serde::shape_simple_scalar_properties::ser_simple_scalar_properties_input(&input)?,
  204    204   
        );
  205    205   
        if let Some(content_length) = body.content_length() {
  206    206   
            let content_length = content_length.to_string();
  207         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
         207  +
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  208    208   
        }
  209    209   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  210    210   
    }
  211    211   
}
  212    212   
#[derive(Debug)]
  213    213   
struct SimpleScalarPropertiesEndpointParamsInterceptor;
  214    214   
  215    215   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for SimpleScalarPropertiesEndpointParamsInterceptor {
  216    216   
    fn name(&self) -> &'static str {
  217    217   
        "SimpleScalarPropertiesEndpointParamsInterceptor"

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/sparse_nulls_operation.rs

@@ -157,157 +237,237 @@
  177    177   
                _input: &crate::operation::sparse_nulls_operation::SparseNullsOperationInput,
  178    178   
                output: &mut ::std::string::String,
  179    179   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  180    180   
                use ::std::fmt::Write as _;
  181    181   
                ::std::write!(output, "/").expect("formatting should succeed");
  182    182   
                ::std::result::Result::Ok(())
  183    183   
            }
  184    184   
            #[allow(clippy::unnecessary_wraps)]
  185    185   
            fn update_http_builder(
  186    186   
                input: &crate::operation::sparse_nulls_operation::SparseNullsOperationInput,
  187         -
                builder: ::http::request::Builder,
  188         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
         187  +
                builder: ::http_1x::request::Builder,
         188  +
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  189    189   
                let mut uri = ::std::string::String::new();
  190    190   
                uri_base(input, &mut uri)?;
  191    191   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  192    192   
            }
  193         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  194         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-amz-json-1.1");
         193  +
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
         194  +
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  195    195   
            builder = _header_serialization_settings.set_default_header(
  196    196   
                builder,
  197         -
                ::http::header::HeaderName::from_static("x-amz-target"),
         197  +
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  198    198   
                "JsonProtocol.SparseNullsOperation",
  199    199   
            );
  200    200   
            builder
  201    201   
        };
  202    202   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_sparse_nulls_operation::ser_sparse_nulls_operation_input(
  203    203   
            &input,
  204    204   
        )?);
  205    205   
        if let Some(content_length) = body.content_length() {
  206    206   
            let content_length = content_length.to_string();
  207         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
         207  +
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  208    208   
        }
  209    209   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  210    210   
    }
  211    211   
}
  212    212   
#[derive(Debug)]
  213    213   
struct SparseNullsOperationEndpointParamsInterceptor;
  214    214   
  215    215   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for SparseNullsOperationEndpointParamsInterceptor {
  216    216   
    fn name(&self) -> &'static str {
  217    217   
        "SparseNullsOperationEndpointParamsInterceptor"

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/serialization_settings.rs

@@ -1,1 +78,83 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/*
    3      3   
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
    4      4   
 * SPDX-License-Identifier: Apache-2.0
    5      5   
 */
    6      6   
    7      7   
#![allow(dead_code)]
    8      8   
    9      9   
use aws_smithy_http::header::set_request_header_if_absent;
   10     10   
use aws_smithy_types::config_bag::{Storable, StoreReplace};
   11         -
use http::header::{HeaderName, CONTENT_LENGTH, CONTENT_TYPE};
          11  +
use http_1x::header::{HeaderName, CONTENT_LENGTH, CONTENT_TYPE};
   12     12   
   13     13   
/// Configuration for how default protocol headers are serialized
   14     14   
#[derive(Clone, Debug, Default)]
   15     15   
pub(crate) struct HeaderSerializationSettings {
   16     16   
    omit_default_content_length: bool,
   17     17   
    omit_default_content_type: bool,
   18     18   
}
   19     19   
   20     20   
impl HeaderSerializationSettings {
   21     21   
    /// Creates new [`HeaderSerializationSettings`]
   22     22   
    pub(crate) fn new() -> Self {
   23     23   
        Default::default()
   24     24   
    }
   25     25   
   26     26   
    /// Omit the default `Content-Length` header during serialization
   27     27   
    pub(crate) fn omit_default_content_length(self) -> Self {
   28     28   
        Self {
   29     29   
            omit_default_content_length: true,
   30     30   
            ..self
   31     31   
        }
   32     32   
    }
   33     33   
   34     34   
    /// Omit the default `Content-Type` header during serialization
   35     35   
    pub(crate) fn omit_default_content_type(self) -> Self {
   36     36   
        Self {
   37     37   
            omit_default_content_type: true,
   38     38   
            ..self
   39     39   
        }
   40     40   
    }
   41     41   
   42     42   
    /// Returns true if the given default header name should be serialized
   43     43   
    fn include_header(&self, header: &HeaderName) -> bool {
   44     44   
        (!self.omit_default_content_length || header != CONTENT_LENGTH) && (!self.omit_default_content_type || header != CONTENT_TYPE)
   45     45   
    }
   46     46   
   47     47   
    /// Sets a default header on the given request builder if it should be serialized
   48         -
    pub(crate) fn set_default_header(&self, mut request: http::request::Builder, header_name: HeaderName, value: &str) -> http::request::Builder {
          48  +
    pub(crate) fn set_default_header(
          49  +
        &self,
          50  +
        mut request: http_1x::request::Builder,
          51  +
        header_name: HeaderName,
          52  +
        value: &str,
          53  +
    ) -> http_1x::request::Builder {
   49     54   
        if self.include_header(&header_name) {
   50     55   
            request = set_request_header_if_absent(request, header_name, value);
   51     56   
        }
   52     57   
        request
   53     58   
    }
   54     59   
}
   55     60   
   56     61   
impl Storable for HeaderSerializationSettings {
   57     62   
    type Storer = StoreReplace<Self>;
   58     63   
}