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

Support IEnumerable when adding query strings. #4978

Merged
merged 1 commit into from
Aug 8, 2020

Conversation

maliming
Copy link
Member

@maliming maliming commented Aug 6, 2020

Resolve #4969

@maliming maliming added this to the 3.1 milestone Aug 6, 2020
@maliming maliming requested a review from hikalkan August 6, 2020 13:37
@maliming maliming changed the title The AddQueryStringParameter method supports values of array type. Support arrays when adding query strings. Aug 6, 2020
@jimmidier
Copy link

Hi @maliming
Thanks for the fix.
But I think we should support Dictionary too, since asp.net core's native model binding feature supports that.
I've created another pr based on yours #4980

@maliming maliming changed the title Support arrays when adding query strings. Support IEnumerable when adding query strings. Aug 6, 2020
@maliming
Copy link
Member Author

maliming commented Aug 7, 2020

In fact, there are many situations, such as using the Dto in collections. We can’t be compatible with all situations. I’m considering introducing the ObjectToQueryString service, which is responsible for generating querystring.

Related article: https://www.hanselman.com/blog/ASPNETWireFormatForModelBindingToArraysListsCollectionsDictionaries.aspx

@jimmidier
Copy link

I think you are right.

@hikalkan hikalkan merged commit 3988354 into dev Aug 8, 2020
@maliming maliming deleted the maliming/arrayinquerystring branch August 17, 2020 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to call a "Get" RESTful service with parameters of "IEnumarable<int>" from HttpAip.Client?
3 participants