I know that this was asked so long ago, but in case someone else runs into this problem, I found the answer.
You use the onBeforeSendHeaders listener when the only listener that supports viewing POST data is onBeforeRequest . However, you also need to provide extraInfoSpec "requestBody" for the third argument .addListener . The following is an example.
const WEB_REQUEST = chrome.webRequest; WEB_REQUEST.onBeforeRequest.addListener( function(details) { if(details.method == "POST") console.log(JSON.stringify(details)); }, {urls: ["<all_urls>"]}, ["blocking", "requestBody"] );
source share