When I receive the HTTP request on my-website.com, the body of the POST looks like this: data[]=1&data[]=2&data[]=3
According to this StackOverflow post, those square brackets are a convention to "address a limitation of PHP, which doesn't generate an array automatically if multiple values with the same name are submitted". All well and good if I'm posting to a PHP server, but if I'm posting to a different kind of server (in my case NancyFx), I can't easily get that data into an array.
I think it would make sense to get rid of these brackets by default and allow developers using unirest-ruby to post to a PHP server to do something like this:
Say I want to post an array of data to a remote source:
When I receive the HTTP request on my-website.com, the body of the POST looks like this:
data[]=1&data[]=2&data[]=3
According to this StackOverflow post, those square brackets are a convention to "address a limitation of PHP, which doesn't generate an array automatically if multiple values with the same name are submitted". All well and good if I'm posting to a PHP server, but if I'm posting to a different kind of server (in my case NancyFx), I can't easily get that data into an array.
I think it would make sense to get rid of these brackets by default and allow developers using unirest-ruby to post to a PHP server to do something like this: