199 199 |
|
200 200 | ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
|
201 201 | }
|
202 202 | }
|
203 203 | #[derive(Debug)]
|
204 204 | struct EmptyInputAndEmptyOutputEndpointParamsInterceptor;
|
205 205 |
|
206 206 | impl ::aws_smithy_runtime_api::client::interceptors::Intercept for EmptyInputAndEmptyOutputEndpointParamsInterceptor {
|
207 207 | fn name(&self) -> &'static str {
|
208 208 | "EmptyInputAndEmptyOutputEndpointParamsInterceptor"
|
209 209 | }
|
210 210 |
|
211 211 | fn read_before_execution(
|
212 212 | &self,
|
213 213 | context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
|
214 214 | '_,
|
215 215 | ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
216 216 | ::aws_smithy_runtime_api::client::interceptors::context::Output,
|
217 217 | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
218 218 | >,
|
219 219 | cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
220 220 | ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
|
221 221 | let _input = context
|
222 222 | .input()
|
223 223 | .downcast_ref::<EmptyInputAndEmptyOutputInput>()
|
224 224 | .ok_or("failed to downcast to EmptyInputAndEmptyOutputInput")?;
|
225 225 |
|
226 226 | let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
|
227 227 | ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
|
228 228 | })?;
|
229 + |
|
229 230 | cfg.interceptor_state()
|
230 231 | .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
|
232 + |
|
231 233 | ::std::result::Result::Ok(())
|
232 234 | }
|
233 235 | }
|
234 236 |
|
235 237 | // The get_* functions below are generated from JMESPath expressions in the
|
236 238 | // operationContextParams trait. They target the operation's input shape.
|
237 239 |
|
238 240 | #[allow(unreachable_code, unused_variables)]
|
239 241 | #[cfg(test)]
|
240 242 | mod empty_input_and_empty_output_test {
|
241 243 |
|
242 244 | /// Empty input serializes no extra query params
|
243 245 | /// Test ID: QueryEmptyInputAndEmptyOutput
|
244 246 | #[::tokio::test]
|
245 247 | #[::tracing_test::traced_test]
|
246 248 | async fn query_empty_input_and_empty_output_request() {
|
247 249 | let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
|
248 250 | let config_builder = crate::config::Config::builder()
|
249 251 | .with_test_defaults()
|
250 252 | .auth_scheme_resolver(crate::config::auth::NoAuthSchemeResolver)
|
251 253 | .endpoint_url("https://example.com");
|
252 254 |
|
253 255 | let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
|
254 256 | let result = client.empty_input_and_empty_output().send().await;
|
255 257 | let _ = dbg!(result);
|
256 258 | let http_request = request_receiver.expect_request();
|
257 259 | let expected_headers = [("Content-Type", "application/x-www-form-urlencoded")];
|
258 260 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
|
259 261 | let body = http_request.body().bytes().expect("body should be strict");
|
260 262 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
|