I am trying to use webrequest api in my Chrome extension. Using the following code block:
$(document).ready(function(){ chrome.webRequest.onBeforeRequest.addListener( function(details) { console.log(details.requestBody); }, {urls: ["https://myurlhere.com/*"]} );});
The console shows me that requestBody is undefined. If I log the data myself, I can check the part object, but I cannot find the requestBody object anywhere.
Is my syntax wrong? I did a few searches and found a couple of other examples, and it seems that it should work the way I am. Any help is appreciated.
source share