480 480 | let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
|
481 481 | ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
|
482 482 | ::pretty_assertions::assert_eq!(uri.path(), "/AllQueryStringTypesInput", "path was incorrect");
|
483 483 | }
|
484 484 |
|
485 485 | /// Handles query string maps
|
486 486 | /// Test ID: RestXmlQueryStringMap
|
487 487 | #[::tokio::test]
|
488 488 | #[::tracing_test::traced_test]
|
489 489 | async fn rest_xml_query_string_map_request() {
|
490 - | let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
|
490 + | let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
|
491 491 | let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
|
492 492 |
|
493 493 | let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
|
494 494 | let result = client
|
495 495 | .all_query_string_types()
|
496 496 | .set_query_params_map_of_strings(::std::option::Option::Some({
|
497 497 | let mut ret = ::std::collections::HashMap::new();
|
498 498 | ret.insert("QueryParamsStringKeyA".to_owned(), "Foo".to_owned());
|
499 499 | ret.insert("QueryParamsStringKeyB".to_owned(), "Bar".to_owned());
|
500 500 | ret
|
501 501 | }))
|
502 502 | .send()
|
503 503 | .await;
|
504 504 | let _ = dbg!(result);
|
505 505 | let http_request = request_receiver.expect_request();
|
506 506 | let expected_query_params = &["QueryParamsStringKeyA=Foo", "QueryParamsStringKeyB=Bar"];
|
507 507 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_query_string(&http_request, expected_query_params));
|
508 508 | let body = http_request.body().bytes().expect("body should be strict");
|
509 509 | // No body.
|
510 510 | ::pretty_assertions::assert_eq!(&body, &bytes::Bytes::new());
|
511 511 | let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
|
512 512 | ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
|
513 513 | ::pretty_assertions::assert_eq!(uri.path(), "/AllQueryStringTypesInput", "path was incorrect");
|
514 514 | }
|
515 515 |
|
516 516 | /// Handles escaping all required characters in the query string.
|
517 517 | /// Test ID: RestXmlQueryStringEscaping
|
518 518 | #[::tokio::test]
|
519 519 | #[::tracing_test::traced_test]
|
520 520 | async fn rest_xml_query_string_escaping_request() {
|
521 - | let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
|
521 + | let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
|
522 522 | let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
|
523 523 |
|
524 524 | let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
|
525 525 | let result = client
|
526 526 | .all_query_string_types()
|
527 527 | .set_query_string(::std::option::Option::Some(" %:/?#[]@!$&'()*+,;=😹".to_owned()))
|
528 528 | .send()
|
529 529 | .await;
|
530 530 | let _ = dbg!(result);
|
531 531 | let http_request = request_receiver.expect_request();
|
532 532 | let expected_query_params = &["String=%20%25%3A%2F%3F%23%5B%5D%40%21%24%26%27%28%29%2A%2B%2C%3B%3D%F0%9F%98%B9"];
|
533 533 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_query_string(&http_request, expected_query_params));
|
534 534 | let body = http_request.body().bytes().expect("body should be strict");
|
535 535 | // No body.
|
536 536 | ::pretty_assertions::assert_eq!(&body, &bytes::Bytes::new());
|
537 537 | let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
|
538 538 | ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
|
539 539 | ::pretty_assertions::assert_eq!(uri.path(), "/AllQueryStringTypesInput", "path was incorrect");
|
540 540 | }
|
541 541 |
|
542 542 | /// Supports handling NaN float query values.
|
543 543 | /// Test ID: RestXmlSupportsNaNFloatQueryValues
|
544 544 | #[::tokio::test]
|
545 545 | #[::tracing_test::traced_test]
|
546 546 | async fn rest_xml_supports_na_n_float_query_values_request() {
|
547 - | let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
|
547 + | let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
|
548 548 | let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
|
549 549 |
|
550 550 | let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
|
551 551 | let result = client
|
552 552 | .all_query_string_types()
|
553 553 | .set_query_float(::std::option::Option::Some(
|
554 554 | <f32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("NaN").expect("invalid string for number"),
|
555 555 | ))
|
556 556 | .set_query_double(::std::option::Option::Some(
|
557 557 | <f64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("NaN").expect("invalid string for number"),
|
558 558 | ))
|
559 559 | .send()
|
560 560 | .await;
|
561 561 | let _ = dbg!(result);
|
562 562 | let http_request = request_receiver.expect_request();
|
563 563 | let expected_query_params = &["Float=NaN", "Double=NaN"];
|
564 564 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_query_string(&http_request, expected_query_params));
|
565 565 | let body = http_request.body().bytes().expect("body should be strict");
|
566 566 | // No body.
|
567 567 | ::pretty_assertions::assert_eq!(&body, &bytes::Bytes::new());
|
568 568 | let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
|
569 569 | ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
|
570 570 | ::pretty_assertions::assert_eq!(uri.path(), "/AllQueryStringTypesInput", "path was incorrect");
|
571 571 | }
|
572 572 |
|
573 573 | /// Supports handling Infinity float query values.
|
574 574 | /// Test ID: RestXmlSupportsInfinityFloatQueryValues
|
575 575 | #[::tokio::test]
|
576 576 | #[::tracing_test::traced_test]
|
577 577 | async fn rest_xml_supports_infinity_float_query_values_request() {
|
578 - | let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
|
578 + | let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
|
579 579 | let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
|
580 580 |
|
581 581 | let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
|
582 582 | let result = client
|
583 583 | .all_query_string_types()
|
584 584 | .set_query_float(::std::option::Option::Some(
|
585 585 | <f32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("Infinity").expect("invalid string for number"),
|
586 586 | ))
|
587 587 | .set_query_double(::std::option::Option::Some(
|
588 588 | <f64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("Infinity").expect("invalid string for number"),
|
589 589 | ))
|
590 590 | .send()
|
591 591 | .await;
|
592 592 | let _ = dbg!(result);
|
593 593 | let http_request = request_receiver.expect_request();
|
594 594 | let expected_query_params = &["Float=Infinity", "Double=Infinity"];
|
595 595 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_query_string(&http_request, expected_query_params));
|
596 596 | let body = http_request.body().bytes().expect("body should be strict");
|
597 597 | // No body.
|
598 598 | ::pretty_assertions::assert_eq!(&body, &bytes::Bytes::new());
|
599 599 | let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
|
600 600 | ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
|
601 601 | ::pretty_assertions::assert_eq!(uri.path(), "/AllQueryStringTypesInput", "path was incorrect");
|
602 602 | }
|
603 603 |
|
604 604 | /// Supports handling -Infinity float query values.
|
605 605 | /// Test ID: RestXmlSupportsNegativeInfinityFloatQueryValues
|
606 606 | #[::tokio::test]
|
607 607 | #[::tracing_test::traced_test]
|
608 608 | async fn rest_xml_supports_negative_infinity_float_query_values_request() {
|
609 - | let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
|
609 + | let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
|
610 610 | let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
|
611 611 |
|
612 612 | let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
|
613 613 | let result = client
|
614 614 | .all_query_string_types()
|
615 615 | .set_query_float(::std::option::Option::Some(
|
616 616 | <f32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("-Infinity").expect("invalid string for number"),
|
617 617 | ))
|
618 618 | .set_query_double(::std::option::Option::Some(
|
619 619 | <f64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("-Infinity").expect("invalid string for number"),
|
620 620 | ))
|
621 621 | .send()
|
622 622 | .await;
|
623 623 | let _ = dbg!(result);
|
624 624 | let http_request = request_receiver.expect_request();
|
625 625 | let expected_query_params = &["Float=-Infinity", "Double=-Infinity"];
|
626 626 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_query_string(&http_request, expected_query_params));
|
627 627 | let body = http_request.body().bytes().expect("body should be strict");
|
628 628 | // No body.
|
629 629 | ::pretty_assertions::assert_eq!(&body, &bytes::Bytes::new());
|
630 630 | let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
|
631 631 | ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
|
632 632 | ::pretty_assertions::assert_eq!(uri.path(), "/AllQueryStringTypesInput", "path was incorrect");
|
633 633 | }
|
634 634 |
|
635 635 | /// Query values of 0 and false are serialized
|
636 636 | /// Test ID: RestXmlZeroAndFalseQueryValues
|
637 637 | #[::tokio::test]
|
638 638 | #[::tracing_test::traced_test]
|
639 639 | async fn rest_xml_zero_and_false_query_values_request() {
|
640 - | let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
|
640 + | let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
|
641 641 | let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
|
642 642 |
|
643 643 | let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
|
644 644 | let result = client
|
645 645 | .all_query_string_types()
|
646 646 | .set_query_integer(::std::option::Option::Some(0))
|
647 647 | .set_query_boolean(::std::option::Option::Some(false))
|
648 648 | .send()
|
649 649 | .await;
|
650 650 | let _ = dbg!(result);
|