【发布时间】:2017-08-14 20:41:53
【问题描述】:
我正在针对 AppleScript 请求发送 curl POST 请求。它发送带有以下文本的数据:“house,dog,plant”。但是,在我的节点服务器上,我刚刚读到:“house”
知道为什么吗?谢谢!
Applescript:
set testText to "house,dog,plant"
do shell script "curl -X POST -d words=" & testText & " http://localhost:3000/comments"
带有 Express 的节点服务器:
exports.getSlideComments = function(req, res) {
console.log("ENTERED POST");
console.log (req.body.words); // It just prints house
res.send('200');
};
【问题讨论】:
-
my answer below 对您有帮助吗?
标签: node.js curl post applescript