node-js-libs/curlrequest

Post query string not workin

Closed this issue · 1 comments

Hi there, i'm trying to send some parameter via POST in the query string and i have something like that:

var _url = 'htttp://url_to_post_data'
var options = {
        url: _url,
        include: true,
        method: "post",
        headers: {
          queryString: {
             argument1: "test",
             argument2: "test2" 
          } 
       }
    };

curl.request(options, function (err, data) {
     console.log(data)
})

But there is no way the POST request submits the query string form-data.

Nevermind, was my issue.

For everyone else, the form-data should go on the "data" method provides in options