157 157 | }
|
158 158 | #[derive(Debug)]
|
159 159 | struct HttpStringPayloadRequestSerializer;
|
160 160 | impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for HttpStringPayloadRequestSerializer {
|
161 161 | #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
|
162 162 | fn serialize_input(
|
163 163 | &self,
|
164 164 | input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
165 165 | _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
166 166 | ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
|
167 167 | let input = input
|
168 168 | .downcast::<crate::operation::http_string_payload::HttpStringPayloadInput>()
|
169 169 | .expect("correct type");
|
170 170 | let _header_serialization_settings = _cfg
|
171 171 | .load::<crate::serialization_settings::HeaderSerializationSettings>()
|
172 172 | .cloned()
|
173 173 | .unwrap_or_default();
|
174 174 | let mut request_builder = {
|
175 175 | #[allow(clippy::uninlined_format_args)]
|
176 176 | fn uri_base(
|
177 177 | _input: &crate::operation::http_string_payload::HttpStringPayloadInput,
|
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, "/StringPayload").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::http_string_payload::HttpStringPayloadInput,
|
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, "text/plain");
|
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, "text/plain");
|
195 195 | builder
|
196 196 | };
|
197 197 | let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_http_string_payload_input::ser_payload_http_payload(
|
198 198 | input.payload,
|
199 199 | )?);
|
200 200 | if let Some(content_length) = body.content_length() {
|
201 201 | let content_length = content_length.to_string();
|
202 - | request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
|
202 + | request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
|
203 203 | }
|
204 204 | ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
|
205 205 | }
|
206 206 | }
|
207 207 | #[derive(Debug)]
|
208 208 | struct HttpStringPayloadEndpointParamsInterceptor;
|
209 209 |
|
210 210 | impl ::aws_smithy_runtime_api::client::interceptors::Intercept for HttpStringPayloadEndpointParamsInterceptor {
|
211 211 | fn name(&self) -> &'static str {
|
212 212 | "HttpStringPayloadEndpointParamsInterceptor"
|
213 213 | }
|
214 214 |
|
215 215 | fn read_before_execution(
|
216 216 | &self,
|
217 217 | context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
|
218 218 | '_,
|
219 219 | ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
220 220 | ::aws_smithy_runtime_api::client::interceptors::context::Output,
|
221 221 | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
222 222 | >,
|
223 223 | cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
224 224 | ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
|
225 225 | let _input = context
|
226 226 | .input()
|
227 227 | .downcast_ref::<HttpStringPayloadInput>()
|
228 228 | .ok_or("failed to downcast to HttpStringPayloadInput")?;
|
229 229 |
|
230 230 | let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
|
231 231 | ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
|
232 232 | })?;
|