The rationale is that, if you want to serialize an object to a query
string, odds are you're not making a request to a node server, but
rather to some other kind of server, which might be running php, perl,
python, or ruby.
In fact, there's been some requests in the past to *not* support
a=1&a=2 as an array, but instead do a "last one wins" just like ruby
and php. In my opinion, that's unnecessary and dumb, and thankfully,
it seems like everyone is getting by just fine without that behavior.
I hate that php and ruby use a[]=1&a[]=2. It's ugly and stupid. It
broke my heart to write querystring.stringify that way, but at the
time, I was writing it as part of a client-side library that was
talking to a php server, so I had no choice.
Right or wrong, it's the de facto standard. If you're stringifying an
object, it's best to assume that you're doing so for some other
implementation that may depend on that.
--i
> --
> You received this message because you are subscribed to the Google Groups
> "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com.
> To unsubscribe from this group, send email to
> nodejs+un...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en.
>
I'd suggest just ditching the [] altogether. If you want to talk to a
PHP server, you can always just abuse your object keys with cruft if
you really want to.
--i
I'm okay with it
--
> On Thu, Apr 15, 2010 at 1:44 AM, <r...@tinyclouds.org> wrote:
>> I'm okay with it
2010/4/15 Scott González <scott.g...@gmail.com>:
> This seems like a strange decision to make. With HTTP being such an
> important part of node, why would we choose to make it difficult to support
> the majority of web sites? I would prefer having native support for both
> methods, with a flag for which one to use, defaulting to the current
> implementation.
I meant that I'm okay with a patch to support it.
--
You received this message because you are subscribed to the Google Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com.
To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nodejs?hl=en.