post方法不工作phantomjs2

时间:2015-02-28 18:41:18

标签: http-post phantomjs

我的标题是

   var headers = {
    'Content-Type': 'application/json'
}

和数据

data = '{"mydata": "foo"}';

和代码是

page.open('my site url', 'POST', data, headers, function (status) {
   var jsonSource = page.content;
   console.log(jsonSource);
   phantom.exit();
});

但是在 onResourceRequest 中,我的方法是' GET' 什么是问题?

0 个答案:

没有答案