ValueError: too many values to unpack (expected 2)
To the best of my understanding, doing this ought to work, since the original purpose of the urlencode tool is to enable using urlencoded forms that match jQuery and PHP's behavior with requests. IMO urlencode should handle arrays in jQuery fashion, just like it matches jQuery's behavior for the case of nested objects.
When I pass an array of Javascript objects to
.ajax
like so:I see from the browser devtools that what I sent (in decoded form) looks like this:
In fact I can even leave the prefix off, using an empty string instead, and the result is the same (without "prefix").
Unfortunately this doesn't work at all with
urlencode
:To the best of my understanding, doing this ought to work, since the original purpose of the
urlencode
tool is to enable using urlencoded forms that match jQuery and PHP's behavior withrequests
. IMOurlencode
should handle arrays in jQuery fashion, just like it matches jQuery's behavior for the case of nested objects.