I am building a Chrome extension and trying to log some requests: the ones with POST parameters (plain text data)
This is the code I'm using:
var requestFilter = {urls: ["<all_urls>"]}; var extraInfoSpec = ['requestHeaders','requestBody','blocking']; // note: without 'requestBody' it works perfectly, but there's no POST data available. var handler = function( details ) { console.log(details); }; chrome.webRequest.onBeforeSendHeaders.addListener(handler, requestFilter, extraInfoSpec); I use requestHeaders and blocking for other things that are not in the example (don't worry about them now)
I am getting this error at page load: Uncaught Error: Invalid value for argument 2. Property '.1': Value must be one of: [requestHeaders, blocking].
I am develping under Chrome Version 36.0.1985.125 m
Form chrome webRequest documentation: Stable since Chrome 23. Contains the HTTP request body data. Only provided if extraInfoSpec contains 'requestBody'.
Any experience with this error? Any known solution? How can I solve this?