0
我的節點請求參數沒有得到它的目標... 我沒有找到任何錯誤......Node.js的POST請求沒有工作
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();
在另一邊, POST陣列(PHP)是完整的空...
我錯過了什麼?
所以你的問題從沒有答案列表中消失,你應該標記您的解決方案。 :-) –