【发布时间】:2016-02-02 12:25:24
【问题描述】:
例如,在 php 服务器上,我从 $_POST 中捕获所有发布的变量
var_dump($_POST);
如果我使用 html 表单发布到服务器,这会很好。
我尝试使用 nodejs 发布到服务器并请求:
requestify.post('http://localhost/rest/1/comment/create', {hello: 'world'})
.then(function(response) {
console.log(response.getBody());
})
这不会被 php-server 捕获,并且 var_dump($_POST) 输出一个空数组。
【问题讨论】: