My parameters in Node-Request aren't getting to its target... I'm not finding any mistakes...
var data = querystring.stringify({
image: 'test',
test: 'testitest'
});
var options = {
host: 'www.visionalism.com',
path: path,
method: 'POST'
};
var photo_req = http.request(options, function(response) {
response.setEncoding('utf8');
response.on('data', function (chunk) {
console.log("body: " + chunk);
});
});
console.log(data);
photo_req.write(data);
photo_req.end();
At the other side, the POST array (php) is complete empty...
Am i missing anything?
solved the problem by adding headers.... bad mistake