aws-amplify / amplify-flutter

A declarative library with an easy-to-use interface for building Flutter applications on AWS.
https://docs.amplify.aws
Apache License 2.0
1.33k stars 248 forks source link

APICategory ignores queryParameters in next.1 version #2412

Closed landyrev closed 1 year ago

landyrev commented 1 year ago

Description

It seems that APICategory ignores queryParameters argument in REST methods like get, post, etc, and don't pass it next to the defaultPlugin.

Categories

Steps to Reproduce

  1. Create a simple API client
  2. Run:
    api.get(
    '/baseUrl',
    queryParameters: {
    'q': 'query',
    },
    );
  3. Ensure (using debugging proxy, for example), that GET request is made without q URL param

Screenshots

No response

Platforms

Android Device/Emulator API Level

No response

Environment

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.3.8, on macOS 13.0 22A380 darwin-arm, locale en-RU)
[!] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 14.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.2)
[✓] VS Code (version 1.73.1)
[✓] Connected device (4 available)
[✓] HTTP Host Availability

! Doctor found issues in 1 category.

Dependencies

Dart SDK 2.18.4
Flutter SDK 3.3.8
captain 1.0.0+1

dependencies:
- amplify_analytics_pinpoint 1.0.0-next.1 [amplify_analytics_pinpoint_dart amplify_core amplify_db_common amplify_secure_storage aws_common device_info_plus flutter meta package_info_plus path_provider]
- amplify_api 1.0.0-next.1 [amplify_api_android amplify_api_ios amplify_core amplify_flutter async aws_common collection connectivity_plus flutter json_annotation meta plugin_platform_interface web_socket_channel]
- amplify_auth_cognito 1.0.0-next.1 [amplify_auth_cognito_android amplify_auth_cognito_dart amplify_auth_cognito_ios amplify_core amplify_flutter amplify_secure_storage async flutter flutter_web_plugins meta path plugin_platform_interface]
- amplify_core 1.0.0-next.1 [async aws_common aws_signature_v4 collection intl json_annotation logging meta retry uuid]
- amplify_flutter 1.0.0-next.1+1 [amplify_core amplify_datastore_plugin_interface amplify_flutter_android amplify_flutter_ios amplify_secure_storage aws_common collection flutter meta plugin_platform_interface]
- amplify_storage_s3 1.0.0-next.1+1 [amplify_core amplify_db_common amplify_storage_s3_dart aws_common flutter meta path_provider]
- amplitude_flutter 3.11.0 [flutter flutter_web_plugins js]
- api_client 0.0.1 [flutter json_annotation json_serializable amplify_core amplify_flutter amplify_auth_cognito amplify_storage_s3 amplify_api path_provider aws_signature_v4]
- async 2.9.0 [collection meta]
- bloc 8.1.0 [meta]
- bosun 0.0.1 [equatable flutter flutter_isolate flutter_web_plugins freezed_annotation image json_annotation logger quiver tuple turf uuid vector_math vector_tile]
- captain_chart 0.0.1 [flutter flutter_web_plugins captain_chart_platform_interface bosun equatable]
- carousel_slider 4.1.1 [flutter]
- clock 1.1.1
- collection 1.16.0
- crisp_chat_sdk 0.0.6 [flutter]
- cupertino_icons 1.0.5
- daylight 2.0.0 [intl angles]
- equatable 2.0.5 [collection meta]
- expandable_text 2.3.0 [flutter]
- facebook_app_events 0.18.1 [flutter]
- firebase_analytics 10.0.6 [firebase_analytics_platform_interface firebase_analytics_web firebase_core firebase_core_platform_interface flutter]
- firebase_core 2.3.0 [firebase_core_platform_interface firebase_core_web flutter meta]
- firebase_remote_config 3.0.6 [firebase_core firebase_core_platform_interface firebase_remote_config_platform_interface firebase_remote_config_web flutter]
- flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine]
- flutter_bloc 8.1.1 [flutter bloc provider]
- flutter_branch_sdk 6.3.0 [flutter flutter_web_plugins plugin_platform_interface js]
- flutter_dotenv 5.0.2 [flutter]
- flutter_html 3.0.0-alpha.6 [html csslib collection numerus flutter]
- flutter_inappwebview 5.7.1+2 [flutter]
- flutter_localizations 0.0.0 [flutter intl characters clock collection material_color_utilities meta path vector_math]
- flutter_screenutil 5.6.0 [flutter]
- flutter_svg 1.1.6 [flutter meta path_drawing vector_math xml]
- form_field_validator 1.1.0 [flutter intl]
- freezed_annotation 2.2.0 [collection json_annotation meta]
- geojson_vi 2.0.7
- geolocator 9.0.2 [flutter geolocator_platform_interface geolocator_android geolocator_apple geolocator_web geolocator_windows]
- get_it 7.2.0 [async collection]
- google_polyline_algorithm 3.1.0
- gpx 1.0.0 [equatable xml]
- hive 2.2.3 [meta crypto]
- hive_flutter 1.1.0 [flutter hive path_provider path]
- http 0.13.5 [async http_parser meta path]
- image 3.2.2 [archive meta xml]
- in_app_purchase 3.0.8 [flutter in_app_purchase_android in_app_purchase_platform_interface in_app_purchase_storekit]
- in_app_purchase_android 0.2.3+7 [collection flutter in_app_purchase_platform_interface json_annotation]
- in_app_purchase_storekit 0.3.3 [collection flutter in_app_purchase_platform_interface json_annotation]
- intl 0.17.0 [clock path]
- json_annotation 4.7.0 [meta]
- logger 1.1.0
- meta 1.8.0
- mixpanel_flutter 2.0.0 [flutter flutter_web_plugins js]
- nav_station_wrapper 0.0.1 [flutter flutter_web_plugins bosun equatable]
- package_info_plus 2.0.0 [flutter package_info_plus_platform_interface package_info_plus_linux package_info_plus_macos package_info_plus_windows package_info_plus_web]
- path_provider 2.0.11 [flutter path_provider_android path_provider_ios path_provider_linux path_provider_macos path_provider_platform_interface path_provider_windows]
- phone_numbers_parser 7.0.0+1 [phone_number_metadata meta dart_countries]
- provider 6.0.4 [collection flutter nested]
- rubber 1.0.1 [flutter after_layout]
- sentry_flutter 6.16.1 [flutter flutter_web_plugins sentry package_info_plus meta]
- simplify 1.0.2
- skipper 0.0.1 [flutter plugin_platform_interface]
- stream_transform 2.1.0
- styled_widget 0.4.1 [flutter lint]
- throttling 1.0.0
- url_launcher 6.1.7 [flutter url_launcher_android url_launcher_ios url_launcher_linux url_launcher_macos url_launcher_platform_interface url_launcher_web url_launcher_windows]
- uuid 3.0.6 [crypto]
- wakelock 0.6.2 [flutter meta wakelock_macos wakelock_platform_interface wakelock_web wakelock_windows]

transitive dependencies:
- _fe_analyzer_shared 47.0.0 [meta]
- _flutterfire_internals 1.0.9 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta]
- after_layout 1.2.0 [flutter]
- amplify_analytics_pinpoint_dart 0.1.0 [amplify_core amplify_db_common_dart amplify_secure_storage_dart aws_common aws_signature_v4 built_collection built_value drift intl meta path smithy smithy_aws uuid]
- amplify_api_android 1.0.0-next.1 [flutter]
- amplify_api_ios 1.0.0-next.1 [amplify_core flutter]
- amplify_auth_cognito_android 1.0.0-next.1 [flutter]
- amplify_auth_cognito_dart 0.2.4 [amplify_core amplify_secure_storage_dart async aws_common aws_signature_v4 built_collection built_value collection convert crypto fixnum http intl js json_annotation meta oauth2 path smithy smithy_aws stream_transform uuid worker_bee]
- amplify_auth_cognito_ios 1.0.0-next.1 [amplify_core flutter]
- amplify_datastore_plugin_interface 1.0.0-next.1 [amplify_core collection flutter meta]
- amplify_db_common 0.1.1 [amplify_db_common_dart drift flutter path path_provider]
- amplify_db_common_dart 0.1.1 [amplify_core async aws_common drift meta path sqlite3]
- amplify_flutter_android 1.0.0-next.1 [flutter]
- amplify_flutter_ios 1.0.0-next.1 [amplify_core flutter]
- amplify_secure_storage 0.1.3 [amplify_secure_storage_dart async file flutter meta path path_provider]
- amplify_secure_storage_dart 0.1.3 [async aws_common built_collection built_value ffi file js meta path win32 worker_bee]
- amplify_storage_s3_dart 0.1.1 [amplify_core amplify_db_common_dart async aws_common aws_signature_v4 built_collection built_value drift fixnum meta path smithy smithy_aws]
- analyzer 4.7.0 [_fe_analyzer_shared collection convert crypto glob meta package_config path pub_semver source_span watcher yaml]
- angles 2.1.1 [meta]
- archive 3.3.0 [crypto path]
- args 2.3.1
- aws_common 0.3.2 [async built_collection built_value collection http2 js json_annotation logging meta os_detect path stream_transform uuid]
- aws_signature_v4 0.3.0 [async aws_common collection convert crypto json_annotation meta path]
- boolean_selector 2.1.0 [source_span string_scanner]
- build 2.3.1 [analyzer async convert crypto glob logging meta path]
- build_config 1.1.1 [checked_yaml json_annotation path pubspec_parse yaml]
- built_collection 5.1.1
- built_value 8.4.2 [built_collection collection fixnum meta]
- captain_chart_platform_interface 0.0.1 [flutter]
- characters 1.2.1
- checked_yaml 2.0.1 [json_annotation source_span yaml]
- cloud_firestore_platform_interface 5.9.0 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- cloud_firestore_web 3.1.0 [_flutterfire_internals cloud_firestore_platform_interface collection firebase_core firebase_core_web flutter flutter_web_plugins js]
- connectivity_plus 2.3.9 [flutter connectivity_plus_platform_interface connectivity_plus_linux connectivity_plus_macos connectivity_plus_web connectivity_plus_windows]
- connectivity_plus_linux 1.3.1 [flutter connectivity_plus_platform_interface meta nm]
- connectivity_plus_macos 1.2.6 [connectivity_plus_platform_interface flutter]
- connectivity_plus_platform_interface 1.2.3 [flutter meta plugin_platform_interface]
- connectivity_plus_web 1.2.5 [connectivity_plus_platform_interface flutter_web_plugins flutter js]
- connectivity_plus_windows 1.2.2 [connectivity_plus_platform_interface flutter]
- convert 3.1.1 [typed_data]
- crclib 3.0.0 [meta tuple]
- crypto 3.0.2 [typed_data]
- csslib 0.17.2 [source_span]
- dart_countries 3.0.3
- dart_style 2.2.4 [analyzer args path pub_semver source_span]
- dbus 0.7.8 [args ffi meta xml]
- device_info_plus 6.0.0 [flutter device_info_plus_platform_interface device_info_plus_macos device_info_plus_linux device_info_plus_web device_info_plus_windows]
- device_info_plus_linux 5.0.0 [device_info_plus_platform_interface file flutter meta]
- device_info_plus_macos 5.0.0 [device_info_plus_platform_interface flutter]
- device_info_plus_platform_interface 5.0.0 [flutter meta plugin_platform_interface]
- device_info_plus_web 5.0.0 [device_info_plus_platform_interface flutter_web_plugins flutter]
- device_info_plus_windows 6.0.0 [device_info_plus_platform_interface ffi flutter win32 meta]
- drift 2.2.0 [async convert collection js meta stream_channel sqlite3]
- fake_async 1.3.1 [clock collection]
- ffi 2.0.1
- file 6.1.2 [meta path]
- firebase_analytics_platform_interface 3.3.14 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface]
- firebase_analytics_web 0.5.1+5 [_flutterfire_internals firebase_analytics_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js]
- firebase_core_platform_interface 4.5.2 [collection flutter flutter_test meta plugin_platform_interface]
- firebase_core_web 2.0.1 [firebase_core_platform_interface flutter flutter_web_plugins js meta]
- firebase_remote_config_platform_interface 1.1.26 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface]
- firebase_remote_config_web 1.1.15 [firebase_core firebase_core_web firebase_remote_config_platform_interface flutter flutter_web_plugins js]
- fixnum 1.0.1
- flutter_isolate 2.0.4 [flutter uuid]
- flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters collection matcher material_color_utilities meta source_span stream_channel string_scanner term_glyph]
- flutter_web_plugins 0.0.0 [flutter js characters collection material_color_utilities meta vector_math]
- geolocator_android 4.1.4 [flutter geolocator_platform_interface]
- geolocator_apple 2.2.4 [flutter geolocator_platform_interface]
- geolocator_platform_interface 4.0.7 [flutter plugin_platform_interface vector_math meta]
- geolocator_web 2.1.6 [flutter flutter_web_plugins geolocator_platform_interface]
- geolocator_windows 0.1.1 [flutter geolocator_platform_interface]
- glob 2.1.0 [async collection file path string_scanner]
- html 0.15.1 [csslib source_span]
- http2 2.0.1
- http_parser 4.0.2 [collection source_span string_scanner typed_data]
- in_app_purchase_platform_interface 1.3.2 [flutter plugin_platform_interface]
- js 0.6.4
- json_serializable 6.5.4 [analyzer async build build_config collection json_annotation meta path pub_semver pubspec_parse source_gen source_helper]
- lint 1.10.0
- logging 1.1.0
- matcher 0.12.12 [stack_trace]
- material_color_utilities 0.1.5
- nested 1.0.0 [flutter]
- nm 0.5.0 [dbus]
- numerus 2.0.0 [characters]
- oauth2 2.0.1 [collection crypto http http_parser]
- os_detect 2.0.1
- package_config 2.1.0 [path]
- package_info_plus_linux 2.0.0 [package_info_plus_platform_interface flutter path]
- package_info_plus_macos 2.0.0 [flutter]
- package_info_plus_platform_interface 2.0.1 [flutter meta plugin_platform_interface]
- package_info_plus_web 2.0.0 [flutter flutter_web_plugins http meta package_info_plus_platform_interface]
- package_info_plus_windows 3.0.0 [package_info_plus_platform_interface ffi flutter win32]
- path 1.8.2
- path_drawing 1.0.1 [vector_math meta path_parsing flutter]
- path_parsing 1.0.1 [vector_math meta]
- path_provider_android 2.0.21 [flutter path_provider_platform_interface]
- path_provider_ios 2.0.11 [flutter path_provider_platform_interface]
- path_provider_linux 2.1.7 [ffi flutter path path_provider_platform_interface xdg_directories]
- path_provider_macos 2.0.6 [flutter path_provider_platform_interface]
- path_provider_platform_interface 2.0.5 [flutter platform plugin_platform_interface]
- path_provider_windows 2.1.3 [ffi flutter path path_provider_platform_interface win32]
- petitparser 5.1.0 [meta]
- phone_number_metadata 5.0.4 [path dart_countries]
- platform 3.1.0
- plugin_platform_interface 2.1.3 [meta]
- process 4.2.4 [file path platform]
- protobuf 2.1.0 [fixnum collection meta]
- pub_semver 2.1.3 [collection meta]
- pubspec_parse 1.2.1 [checked_yaml collection json_annotation pub_semver yaml]
- quiver 3.1.0 [matcher]
- retry 3.1.0
- sentry 6.16.1 [http meta stack_trace uuid intl]
- shelf 1.4.0 [async collection http_parser path stack_trace stream_channel]
- sky_engine 0.0.99
- smithy 0.3.0 [async aws_common built_collection built_value collection convert crypto fixnum http_parser intl json_annotation meta path retry shelf typed_data xml]
- smithy_aws 0.3.0 [aws_common aws_signature_v4 built_collection built_value collection convert crclib crypto intl json_annotation meta path smithy xml]
- source_gen 1.2.6 [analyzer async build dart_style glob meta path source_span yaml]
- source_helper 1.3.3 [analyzer collection source_gen]
- source_span 1.9.0 [collection path term_glyph]
- sqlite3 1.9.1 [collection ffi js meta path]
- stack_trace 1.10.0 [path]
- stream_channel 2.1.0 [async]
- string_scanner 1.1.1 [source_span]
- term_glyph 1.2.1
- test_api 0.4.12 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph matcher]
- tuple 2.0.1
- turf 0.0.7 [json_annotation turf_equality]
- turf_equality 0.0.2 [turf]
- typed_data 1.3.1 [collection]
- url_launcher_android 6.0.22 [flutter url_launcher_platform_interface]
- url_launcher_ios 6.0.17 [flutter url_launcher_platform_interface]
- url_launcher_linux 3.0.1 [flutter url_launcher_platform_interface]
- url_launcher_macos 3.0.1 [flutter url_launcher_platform_interface]
- url_launcher_platform_interface 2.1.1 [flutter plugin_platform_interface]
- url_launcher_web 2.0.13 [flutter flutter_web_plugins url_launcher_platform_interface]
- url_launcher_windows 3.0.1 [flutter url_launcher_platform_interface]
- vector_math 2.1.2
- vector_tile 1.0.0 [fixnum protobuf]
- wakelock_macos 0.4.0 [flutter flutter_web_plugins wakelock_platform_interface]
- wakelock_platform_interface 0.3.0 [flutter meta]
- wakelock_web 0.4.0 [flutter flutter_web_plugins js wakelock_platform_interface]
- wakelock_windows 0.2.1 [flutter wakelock_platform_interface win32]
- watcher 1.0.2 [async path]
- web_socket_channel 2.2.0 [async crypto stream_channel]
- win32 3.1.1 [ffi]
- worker_bee 0.1.2 [async aws_common built_collection built_value collection js meta path stack_trace stream_channel stream_transform]
- xdg_directories 0.2.0+2 [meta path process]
- xml 6.1.0 [collection meta petitparser]
- yaml 3.1.1 [collection source_span string_scanner]

Device

iPhone 14 Pro Max simulator

OS

iOS 16.1

Deployment Method

Custom Pipeline

CLI Version

No response

Additional Context

No response

Amplify Config

Not applicable

dnys1 commented 1 year ago

Good find, @landyrev and thanks for the PR!

ragingsquirrel3 commented 1 year ago

This was released with https://pub.dev/packages/amplify_api/versions/1.0.0-next.1+1, closing.