514 514 | let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
|
515 515 | ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
|
516 516 | ::pretty_assertions::assert_eq!(uri.path(), "/AllQueryStringTypesInput", "path was incorrect");
|
517 517 | }
|
518 518 |
|
519 519 | /// Handles query string maps
|
520 520 | /// Test ID: RestJsonQueryStringMap
|
521 521 | #[::tokio::test]
|
522 522 | #[::tracing_test::traced_test]
|
523 523 | async fn rest_json_query_string_map_request() {
|
524 - | let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
|
524 + | let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
|
525 525 | let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
|
526 526 |
|
527 527 | let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
|
528 528 | let result = client
|
529 529 | .all_query_string_types()
|
530 530 | .set_query_params_map_of_string_list(::std::option::Option::Some({
|
531 531 | let mut ret = ::std::collections::HashMap::new();
|
532 532 | ret.insert("QueryParamsStringKeyA".to_owned(), vec!["Foo".to_owned()]);
|
533 533 | ret.insert("QueryParamsStringKeyB".to_owned(), vec!["Bar".to_owned()]);
|
534 534 | ret
|
535 535 | }))
|
536 536 | .send()
|
537 537 | .await;
|
538 538 | let _ = dbg!(result);
|
539 539 | let http_request = request_receiver.expect_request();
|
540 540 | let expected_query_params = &["QueryParamsStringKeyA=Foo", "QueryParamsStringKeyB=Bar"];
|
541 541 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_query_string(&http_request, expected_query_params));
|
542 542 | let body = http_request.body().bytes().expect("body should be strict");
|
543 543 | // No body.
|
544 544 | ::pretty_assertions::assert_eq!(&body, &bytes::Bytes::new());
|
545 545 | let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
|
546 546 | ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
|
547 547 | ::pretty_assertions::assert_eq!(uri.path(), "/AllQueryStringTypesInput", "path was incorrect");
|
548 548 | }
|
549 549 |
|
550 550 | /// Handles escaping all required characters in the query string.
|
551 551 | /// Test ID: RestJsonQueryStringEscaping
|
552 552 | #[::tokio::test]
|
553 553 | #[::tracing_test::traced_test]
|
554 554 | async fn rest_json_query_string_escaping_request() {
|
555 - | let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
|
555 + | let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
|
556 556 | let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
|
557 557 |
|
558 558 | let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
|
559 559 | let result = client
|
560 560 | .all_query_string_types()
|
561 561 | .set_query_string(::std::option::Option::Some(" %:/?#[]@!$&'()*+,;=😹".to_owned()))
|
562 562 | .set_query_params_map_of_string_list(::std::option::Option::Some({
|
563 563 | let mut ret = ::std::collections::HashMap::new();
|
564 564 | ret.insert("String".to_owned(), vec![" %:/?#[]@!$&'()*+,;=😹".to_owned()]);
|
565 565 | ret
|
566 566 | }))
|
567 567 | .send()
|
568 568 | .await;
|
569 569 | let _ = dbg!(result);
|
570 570 | let http_request = request_receiver.expect_request();
|
571 571 | 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"];
|
572 572 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_query_string(&http_request, expected_query_params));
|
573 573 | let body = http_request.body().bytes().expect("body should be strict");
|
574 574 | // No body.
|
575 575 | ::pretty_assertions::assert_eq!(&body, &bytes::Bytes::new());
|
576 576 | let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
|
577 577 | ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
|
578 578 | ::pretty_assertions::assert_eq!(uri.path(), "/AllQueryStringTypesInput", "path was incorrect");
|
579 579 | }
|
580 580 |
|
581 581 | /// Supports handling NaN float query values.
|
582 582 | /// Test ID: RestJsonSupportsNaNFloatQueryValues
|
583 583 | #[::tokio::test]
|
584 584 | #[::tracing_test::traced_test]
|
585 585 | async fn rest_json_supports_na_n_float_query_values_request() {
|
586 - | let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
|
586 + | let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
|
587 587 | let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
|
588 588 |
|
589 589 | let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
|
590 590 | let result = client
|
591 591 | .all_query_string_types()
|
592 592 | .set_query_float(::std::option::Option::Some(
|
593 593 | <f32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("NaN").expect("invalid string for number"),
|
594 594 | ))
|
595 595 | .set_query_double(::std::option::Option::Some(
|
596 596 | <f64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("NaN").expect("invalid string for number"),
|
597 597 | ))
|
598 598 | .set_query_params_map_of_string_list(::std::option::Option::Some({
|
599 599 | let mut ret = ::std::collections::HashMap::new();
|
600 600 | ret.insert("Float".to_owned(), vec!["NaN".to_owned()]);
|
601 601 | ret.insert("Double".to_owned(), vec!["NaN".to_owned()]);
|
602 602 | ret
|
603 603 | }))
|
604 604 | .send()
|
605 605 | .await;
|
606 606 | let _ = dbg!(result);
|
607 607 | let http_request = request_receiver.expect_request();
|
608 608 | let expected_query_params = &["Float=NaN", "Double=NaN"];
|
609 609 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_query_string(&http_request, expected_query_params));
|
610 610 | let body = http_request.body().bytes().expect("body should be strict");
|
611 611 | // No body.
|
612 612 | ::pretty_assertions::assert_eq!(&body, &bytes::Bytes::new());
|
613 613 | let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
|
614 614 | ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
|
615 615 | ::pretty_assertions::assert_eq!(uri.path(), "/AllQueryStringTypesInput", "path was incorrect");
|
616 616 | }
|
617 617 |
|
618 618 | /// Supports handling Infinity float query values.
|
619 619 | /// Test ID: RestJsonSupportsInfinityFloatQueryValues
|
620 620 | #[::tokio::test]
|
621 621 | #[::tracing_test::traced_test]
|
622 622 | async fn rest_json_supports_infinity_float_query_values_request() {
|
623 - | let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
|
623 + | let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
|
624 624 | let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
|
625 625 |
|
626 626 | let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
|
627 627 | let result = client
|
628 628 | .all_query_string_types()
|
629 629 | .set_query_float(::std::option::Option::Some(
|
630 630 | <f32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("Infinity").expect("invalid string for number"),
|
631 631 | ))
|
632 632 | .set_query_double(::std::option::Option::Some(
|
633 633 | <f64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("Infinity").expect("invalid string for number"),
|
634 634 | ))
|
635 635 | .set_query_params_map_of_string_list(::std::option::Option::Some({
|
636 636 | let mut ret = ::std::collections::HashMap::new();
|
637 637 | ret.insert("Float".to_owned(), vec!["Infinity".to_owned()]);
|
638 638 | ret.insert("Double".to_owned(), vec!["Infinity".to_owned()]);
|
639 639 | ret
|
640 640 | }))
|
641 641 | .send()
|
642 642 | .await;
|
643 643 | let _ = dbg!(result);
|
644 644 | let http_request = request_receiver.expect_request();
|
645 645 | let expected_query_params = &["Float=Infinity", "Double=Infinity"];
|
646 646 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_query_string(&http_request, expected_query_params));
|
647 647 | let body = http_request.body().bytes().expect("body should be strict");
|
648 648 | // No body.
|
649 649 | ::pretty_assertions::assert_eq!(&body, &bytes::Bytes::new());
|
650 650 | let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
|
651 651 | ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
|
652 652 | ::pretty_assertions::assert_eq!(uri.path(), "/AllQueryStringTypesInput", "path was incorrect");
|
653 653 | }
|
654 654 |
|
655 655 | /// Supports handling -Infinity float query values.
|
656 656 | /// Test ID: RestJsonSupportsNegativeInfinityFloatQueryValues
|
657 657 | #[::tokio::test]
|
658 658 | #[::tracing_test::traced_test]
|
659 659 | async fn rest_json_supports_negative_infinity_float_query_values_request() {
|
660 - | let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
|
660 + | let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
|
661 661 | let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
|
662 662 |
|
663 663 | let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
|
664 664 | let result = client
|
665 665 | .all_query_string_types()
|
666 666 | .set_query_float(::std::option::Option::Some(
|
667 667 | <f32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("-Infinity").expect("invalid string for number"),
|
668 668 | ))
|
669 669 | .set_query_double(::std::option::Option::Some(
|
670 670 | <f64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("-Infinity").expect("invalid string for number"),
|
671 671 | ))
|
672 672 | .set_query_params_map_of_string_list(::std::option::Option::Some({
|
673 673 | let mut ret = ::std::collections::HashMap::new();
|
674 674 | ret.insert("Float".to_owned(), vec!["-Infinity".to_owned()]);
|
675 675 | ret.insert("Double".to_owned(), vec!["-Infinity".to_owned()]);
|
676 676 | ret
|
677 677 | }))
|
678 678 | .send()
|
679 679 | .await;
|
680 680 | let _ = dbg!(result);
|
681 681 | let http_request = request_receiver.expect_request();
|
682 682 | let expected_query_params = &["Float=-Infinity", "Double=-Infinity"];
|
683 683 | ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_query_string(&http_request, expected_query_params));
|
684 684 | let body = http_request.body().bytes().expect("body should be strict");
|
685 685 | // No body.
|
686 686 | ::pretty_assertions::assert_eq!(&body, &bytes::Bytes::new());
|
687 687 | let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
|
688 688 | ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
|
689 689 | ::pretty_assertions::assert_eq!(uri.path(), "/AllQueryStringTypesInput", "path was incorrect");
|
690 690 | }
|
691 691 |
|
692 692 | /// Query values of 0 and false are serialized
|
693 693 | /// Test ID: RestJsonZeroAndFalseQueryValues
|
694 694 | #[::tokio::test]
|
695 695 | #[::tracing_test::traced_test]
|
696 696 | async fn rest_json_zero_and_false_query_values_request() {
|
697 - | let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
|
697 + | let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
|
698 698 | let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
|
699 699 |
|
700 700 | let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
|
701 701 | let result = client
|
702 702 | .all_query_string_types()
|
703 703 | .set_query_integer(::std::option::Option::Some(0))
|
704 704 | .set_query_boolean(::std::option::Option::Some(false))
|
705 705 | .set_query_params_map_of_string_list(::std::option::Option::Some({
|
706 706 | let mut ret = ::std::collections::HashMap::new();
|
707 707 | ret.insert("Integer".to_owned(), vec!["0".to_owned()]);
|