Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multimple query params with same name #1273

Closed
4uzhoy opened this issue Sep 10, 2021 · 1 comment
Closed

Multimple query params with same name #1273

4uzhoy opened this issue Sep 10, 2021 · 1 comment

Comments

@4uzhoy
Copy link

4uzhoy commented Sep 10, 2021

Recently, i had to send GET request with queryParams with same query param name,
url looks like: BASE_URL/api/v1/needs_update/status=NEEDS_UPDATE&status=AVAILABLE&limit=30&offset=0
as you seen status duplictes and filter response like:
list.where( (e) =>( e.status =='NEEDS_UPDATE' && e.status=='AVAILABLE' ));

in requests queryParameters have type Map<String, dynamic>? queryParameters,
that means i can't pass same key into map, there is option to pass same queries? if not which is the best way to pass it ?
at this moment i pass params by manual into URL string

I have not found a similar issue in closed

@4uzhoy
Copy link
Author

4uzhoy commented Sep 10, 2021

looked for similar ones and found something, I think it will solve my problem
#734
perhaps it is worth more explicitly mentioning such a case in the documentation for

UPD: thats works, i close issue,
link on gist with solution from issue , with migrated code to null-safety
https://gist.github.com/4uzhoy/917023fb8684e8ad9229b0cc908375

@4uzhoy 4uzhoy closed this as completed Sep 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant