Client Test

Client Test

rev. a99793f1dc1189b24f929680e6261c18b529657b

Files changed:

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/operation/streaming_operation.rs

@@ -174,174 +238,241 @@
  194    194   
            #[allow(clippy::unnecessary_wraps)]
  195    195   
            fn update_http_builder(
  196    196   
                input: &crate::operation::streaming_operation::StreamingOperationInput,
  197    197   
                builder: ::http::request::Builder,
  198    198   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  199    199   
                let mut uri = ::std::string::String::new();
  200    200   
                uri_base(input, &mut uri)?;
  201    201   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  202    202   
            }
  203    203   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  204         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/cbor");
         204  +
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/vnd.amazon.eventstream");
  205    205   
            builder =
  206    206   
                _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("smithy-protocol"), "rpc-v2-cbor");
  207         -
            builder =
  208         -
                _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("accept"), "application/cbor");
         207  +
            builder = _header_serialization_settings.set_default_header(
         208  +
                builder,
         209  +
                ::http::header::HeaderName::from_static("accept"),
         210  +
                "application/vnd.amazon.eventstream, application/cbor",
         211  +
            );
  209    212   
            builder
  210    213   
        };
  211    214   
        let body = ::aws_smithy_types::body::SdkBody::from({
  212    215   
            let error_marshaller = crate::event_stream_serde::EventsErrorMarshaller::new();
  213    216   
            let marshaller = crate::event_stream_serde::EventsMarshaller::new();
  214    217   
            let (signer, signer_sender) = ::aws_smithy_eventstream::frame::DeferredSigner::new();
  215    218   
            _cfg.interceptor_state().store_put(signer_sender);
  216    219   
            ::aws_smithy_types::body::SdkBody::from_body_0_4(::hyper::Body::wrap_stream(input.events.into_body_stream(
  217    220   
                marshaller,
  218    221   
                error_marshaller,

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/operation/streaming_operation_with_initial_data.rs

@@ -176,176 +240,243 @@
  196    196   
            #[allow(clippy::unnecessary_wraps)]
  197    197   
            fn update_http_builder(
  198    198   
                input: &crate::operation::streaming_operation_with_initial_data::StreamingOperationWithInitialDataInput,
  199    199   
                builder: ::http::request::Builder,
  200    200   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  201    201   
                let mut uri = ::std::string::String::new();
  202    202   
                uri_base(input, &mut uri)?;
  203    203   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  204    204   
            }
  205    205   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  206         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/cbor");
         206  +
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/vnd.amazon.eventstream");
  207    207   
            builder =
  208    208   
                _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("smithy-protocol"), "rpc-v2-cbor");
  209         -
            builder =
  210         -
                _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("accept"), "application/cbor");
         209  +
            builder = _header_serialization_settings.set_default_header(
         210  +
                builder,
         211  +
                ::http::header::HeaderName::from_static("accept"),
         212  +
                "application/vnd.amazon.eventstream, application/cbor",
         213  +
            );
  211    214   
            builder
  212    215   
        };
  213    216   
        let body = ::aws_smithy_types::body::SdkBody::from({
  214    217   
            let error_marshaller = crate::event_stream_serde::EventsErrorMarshaller::new();
  215    218   
            let marshaller = crate::event_stream_serde::EventsMarshaller::new();
  216    219   
            let (signer, signer_sender) = ::aws_smithy_eventstream::frame::DeferredSigner::new();
  217    220   
            _cfg.interceptor_state().store_put(signer_sender);
  218    221   
            ::aws_smithy_types::body::SdkBody::from_body_0_4(::hyper::Body::wrap_stream({
  219    222   
                use ::futures_util::StreamExt;
  220    223   
                let body =

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/operation/streaming_operation_with_initial_response.rs

@@ -179,179 +243,246 @@
  199    199   
            #[allow(clippy::unnecessary_wraps)]
  200    200   
            fn update_http_builder(
  201    201   
                input: &crate::operation::streaming_operation_with_initial_response::StreamingOperationWithInitialResponseInput,
  202    202   
                builder: ::http::request::Builder,
  203    203   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  204    204   
                let mut uri = ::std::string::String::new();
  205    205   
                uri_base(input, &mut uri)?;
  206    206   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  207    207   
            }
  208    208   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  209         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/cbor");
         209  +
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/vnd.amazon.eventstream");
  210    210   
            builder =
  211    211   
                _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("smithy-protocol"), "rpc-v2-cbor");
  212         -
            builder =
  213         -
                _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("accept"), "application/cbor");
         212  +
            builder = _header_serialization_settings.set_default_header(
         213  +
                builder,
         214  +
                ::http::header::HeaderName::from_static("accept"),
         215  +
                "application/vnd.amazon.eventstream, application/cbor",
         216  +
            );
  214    217   
            builder
  215    218   
        };
  216    219   
        let body = ::aws_smithy_types::body::SdkBody::from({
  217    220   
            let error_marshaller = crate::event_stream_serde::EventsErrorMarshaller::new();
  218    221   
            let marshaller = crate::event_stream_serde::EventsMarshaller::new();
  219    222   
            let (signer, signer_sender) = ::aws_smithy_eventstream::frame::DeferredSigner::new();
  220    223   
            _cfg.interceptor_state().store_put(signer_sender);
  221    224   
            ::aws_smithy_types::body::SdkBody::from_body_0_4(::hyper::Body::wrap_stream(input.events.into_body_stream(
  222    225   
                marshaller,
  223    226   
                error_marshaller,

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/operation/streaming_operation_with_optional_data.rs

@@ -176,176 +240,243 @@
  196    196   
            #[allow(clippy::unnecessary_wraps)]
  197    197   
            fn update_http_builder(
  198    198   
                input: &crate::operation::streaming_operation_with_optional_data::StreamingOperationWithOptionalDataInput,
  199    199   
                builder: ::http::request::Builder,
  200    200   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  201    201   
                let mut uri = ::std::string::String::new();
  202    202   
                uri_base(input, &mut uri)?;
  203    203   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  204    204   
            }
  205    205   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  206         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/cbor");
         206  +
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/vnd.amazon.eventstream");
  207    207   
            builder =
  208    208   
                _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("smithy-protocol"), "rpc-v2-cbor");
  209         -
            builder =
  210         -
                _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("accept"), "application/cbor");
         209  +
            builder = _header_serialization_settings.set_default_header(
         210  +
                builder,
         211  +
                ::http::header::HeaderName::from_static("accept"),
         212  +
                "application/vnd.amazon.eventstream, application/cbor",
         213  +
            );
  211    214   
            builder
  212    215   
        };
  213    216   
        let body = ::aws_smithy_types::body::SdkBody::from({
  214    217   
            let error_marshaller = crate::event_stream_serde::EventsErrorMarshaller::new();
  215    218   
            let marshaller = crate::event_stream_serde::EventsMarshaller::new();
  216    219   
            let (signer, signer_sender) = ::aws_smithy_eventstream::frame::DeferredSigner::new();
  217    220   
            _cfg.interceptor_state().store_put(signer_sender);
  218    221   
            ::aws_smithy_types::body::SdkBody::from_body_0_4(::hyper::Body::wrap_stream({
  219    222   
                use ::futures_util::StreamExt;
  220    223   
                let body =