我试图在一个简单的 chrome 扩展中获取发布数据,但它不起作用:
chrome.webRequest.onBeforeSendHeaders.addListener(
function(details) {
if (details.method == "POST") {
var postData=details.requestBody.raw;
console.log(postData);
}
return {requestHeaders: details.requestHeaders};
},
{urls: ["<all_urls>"]},
["blocking", "requestHeaders"]);
我正在使用这个站点来测试扩展:
https://mobile.onlinesbi.com/sbidownloader/DownloadApplication.action