8

I see that there is no way to inspect the body with declarativeNetRequest.

https://developer.chrome.com/docs/extensions/mv3/mv3-migration-checklist/ indicates I should replace webRequestBlocking with declarativeNetRequest permission. But it doesn’t say that chrome.webRequest API is deprecated in v3 (it looks like it is) or how long will it continue to work with manifest v2.

Should I stick with manifest v2 even though I don’t know how long it will last? Google says they made this change for privacy reasons but I don’t see them removing content scripts...

miran80
  • 945
  • 7
  • 22
  • 3
    chrome.webRequest is not deprecated but it can't use `blocking` mode, which shouldn't be necessary to see the body. – wOxxOm May 06 '21 at 17:18
  • Hm, all details objects are missing any kidnd of response body. Even when there is a non-null content length response header and type text/html, there is no body property. Notice the list of properties on the details object on this documentation page, when using onHeadersReceived here: https://developer.chrome.com/docs/extensions/reference/webRequest/#event-onHeadersReceived – miran80 May 06 '21 at 18:07
  • You should probably add [MCVE](/help/mcve) because `body` is present only on outgoing requests in MV2, specifically `requestBody`. – wOxxOm May 06 '21 at 18:10
  • Oh, I am trying to get a response body, I guess this can't be done then. Will try to come up with MCVE. – miran80 May 06 '21 at 18:21
  • 1
    It was never possible so we had to use workarounds, see [Chrome Extension - How to get HTTP Response Body?](https://stackoverflow.com/q/18534771) – wOxxOm May 06 '21 at 18:33

0 Answers0