156 156 | ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
|
157 157 | let input = input
|
158 158 | .downcast::<crate::operation::single_member_struct_operation::SingleMemberStructOperationInput>()
|
159 159 | .expect("correct type");
|
160 160 | let _header_serialization_settings = _cfg
|
161 161 | .load::<crate::serialization_settings::HeaderSerializationSettings>()
|
162 162 | .cloned()
|
163 163 | .unwrap_or_default();
|
164 164 | let mut request_builder = {
|
165 165 | fn uri_base(
|
166 166 | _input: &crate::operation::single_member_struct_operation::SingleMemberStructOperationInput,
|
167 167 | output: &mut ::std::string::String,
|
168 168 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
|
169 169 | use ::std::fmt::Write as _;
|
170 170 | ::std::write!(output, "/service/RpcV2CborService/operation/SingleMemberStructOperation").expect("formatting should succeed");
|
171 171 | ::std::result::Result::Ok(())
|
172 172 | }
|
173 173 | #[allow(clippy::unnecessary_wraps)]
|
174 174 | fn update_http_builder(
|
175 175 | input: &crate::operation::single_member_struct_operation::SingleMemberStructOperationInput,
|
176 176 | builder: ::http::request::Builder,
|
177 177 | ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
|
178 178 | let mut uri = ::std::string::String::new();
|
179 179 | uri_base(input, &mut uri)?;
|
180 180 | ::std::result::Result::Ok(builder.method("POST").uri(uri))
|
181 181 | }
|
182 182 | let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
|
183 183 | builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/cbor");
|
184 184 | builder =
|
185 185 | _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("smithy-protocol"), "rpc-v2-cbor");
|
186 - | builder =
|
187 - | _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("accept"), "application/cbor");
|
188 186 | builder
|
189 187 | };
|
190 188 | let body = ::aws_smithy_types::body::SdkBody::from(
|
191 189 | crate::protocol_serde::shape_single_member_struct_operation::ser_single_member_struct_operation_input(&input)?,
|
192 190 | );
|
193 191 | if let Some(content_length) = body.content_length() {
|
194 192 | let content_length = content_length.to_string();
|
195 193 | request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
|
196 194 | }
|
197 195 | ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
|
198 196 | }
|
199 197 | }
|
200 198 | #[derive(Debug)]
|
201 199 | struct SingleMemberStructOperationEndpointParamsInterceptor;
|
202 200 |
|
203 201 | impl ::aws_smithy_runtime_api::client::interceptors::Intercept for SingleMemberStructOperationEndpointParamsInterceptor {
|
204 202 | fn name(&self) -> &'static str {
|
205 203 | "SingleMemberStructOperationEndpointParamsInterceptor"
|
206 204 | }
|
207 205 |
|
208 206 | fn read_before_execution(
|
209 207 | &self,
|
210 208 | context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
|
211 209 | '_,
|
212 210 | ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
213 211 | ::aws_smithy_runtime_api::client::interceptors::context::Output,
|
214 212 | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
215 213 | >,
|
216 214 | cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
217 215 | ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
|