-
Notifications
You must be signed in to change notification settings - Fork 46
Add support complexe object into queryParams #25
base: master
Are you sure you want to change the base?
Conversation
convert each value candidate to string params into a json string before go into encoreURIComponent Used JSON.stringify, which according to http://caniuse.com/#search=JSON is available in every browser without restriction since IE9 Added test for that, but can't run them since there is missing parts for running them from the sources
|
My bad, i didn't see the bower.json. |
Separate tests for neasted object and arrays into distinct files correct xhr parm encoding
|
this time the test have been runned and it works |
|
I'v signed the cla also |
|
@benzen This PR is in fact conflicting, since it removes that capability. It is also very specific, since no one has standardized that the parameter values can be json, and server-side code needs to add code to decode the parameter values it expects to be in json. Furthermore, the parameter values can be encoded before the params object is passed to core-ajax, thus while support for encoding complex objects into json strings is quite convenient in core-ajax, it might not be the best place for it (or at least shouldn't happen automatically). |
|
Sorry i didnt give enough Time to reading your PR. I think we should give it more Time in order to merge ouR PR. Envoyé de mon iPhone
|
|
Might it be more appropriate to send this JSON in the body of a POST request? Alternatively, you can stringify your json before setting the value of the parameter. The decision on how to handle object-valued parameters seems like something that should be handled on a per-application basis, instead of being baked into core-ajax. |
|
I do agree with this proposition. |
convert each value candidate to string params into a json string before
go into encoreURIComponent
Used JSON.stringify, which according to http://caniuse.com/#search=JSON
is available in every browser without restriction since IE9
Added test for that, but can't run them since there is missing parts for
running them from the sources