-
Notifications
You must be signed in to change notification settings - Fork 27.4k
fix($http): support url format variant for arrays value #fixes 7363 #7409
Conversation
$http now supports both url format `/foo?countries[]=US&countries[]=GB` and `/foo?countries=US&countries=GB` In order to activate the first format, config.useArrayParams must be set to true.
Thanks for the PR! Please check the items below to help us merge this faster. See the contributing docs for more information.
If you need to make changes to your pull request, you can update the commit with Thanks again for your help! |
PR for #7363 |
I'm sorry, but I wasn't able to verify your Contributor License Agreement (CLA) signature. CLA signature is required for any code contributions to AngularJS. Please sign our CLA and ensure that the CLA signature email address and the email address in this PR's commits match. If you signed the CLA as a corporation, please let us know the company's name. Thanks a bunch! PS: If you signed the CLA in the past then most likely the email addresses don't match. Please sign the CLA again or update the email address in the commit of this PR. |
#up Just signed the CLA. |
I was working in a somehow more generic solution #7423 |
@Igalfaso there is are lot of duplicated code between So my simple implementation + a allowing user-side overriding should be enough I think (everything other than that seems to be premature optimization IMHO). |
CLA signature verified! Thank you! Someone from the team will now triage your PR and it will be processed based on the determined priority (doc updates and fixes with tests are prioritized over other changes). |
as mentioned in #7423 (comment) I'm not keen on having multiple serialization strategies, but you are right that there are only two popular strategies. can you provide a list of popular backends that would benefit from this serialization format? I know of:
Rails, .net/asp, and many others don't use that format. If there is some other noticeable backends then we should reconsider this PR. In order to get it in, we'll need tests though. |
02dc2aa
to
fd2d6c0
Compare
cad9560
to
f294244
Compare
8292c21
to
7b9fddf
Compare
4dd5a20
to
998c61c
Compare
So, this PR was stale for some months now and I don't think that we want to merge it in the current form as:
Based on the above and the fact that this PR doesn't merge cleanly any more, doesn't have tests etc. I'm going to close this one. @FGRibreau we do appreciate your effort and contribution so if you could review the proposal in https://gist.github.com/pkozlowski-opensource/5a57d28ccfeacaba7661 this would be much appreciated. |
$http now supports both url format
/foo?countries[]=US&countries[]=GB
and/foo?countries=US&countries=GB
In order to activate the first format, config.useArrayParams must be set to true.
Fixes #7363