Closed tj closed 12 years ago
+1
{ limit: 1 }
doesn't work but { limit: '1' }
does.
+1
Code to reproduce:
var qs = require('qs');
var request = require('request');
request.post({url: 'http://httpbin.org/post', body: qs.stringify({foo: 'bar', count: 42, bar: 'baz'})}, function(err, res, body) {
console.log(body);
});
The resulting POST body is foo=bar&count&bar=baz
. Notice the &count
- the value seems to get dropped completely and inexplicably.
+1
+1
ex
{ limit: ['1', '2'] }
is fine but numbers will give you[]