Reading and modifying the HTTP GET request in a Chrome extension
I would like to read and modify (add) HTTP headers in a Chrome extension. I am using the chrome.webRequest API for the same. But i am still not able to read it. Here's my code. chrome.webRequest.onBeforeSendHeaders.addListener( function(details) { details.requestHeaders.push({name:"dummyHeader",value:"1"}); return {requestHeaders: details.requestHeaders}; }, {urls: ["<all_urls>"]}, ["requestHeaders"] ); What am i missing? You need to add the "blocking" flag to the ExtraInfoSpec list in order to pause the request. Without this flag, the return value of an onBeforeSendHeaders event listener is