Closed lprimeroo closed 9 years ago
Use the data
option.
If you want to make a POST request with content type application/x-www-form-urlencoded
:
curl.request({
url: 'http://example.com/',
data: {'foo': 'bar'}
}, function (err, response) {
});
If you want to make a GET request, then either use curl.request('http://example.com/?foo=bar', ...)
, or the long form version:
curl.request({
get: true,
url: 'http://example.com/',
data: {'foo': 'bar'},
}, function (err, response) {
});
as in request parameters .