I’m trying to read some data from the incoming requests inside a chrome extension. Wierd issue is that in case of a POST request I get data from the body, but when reading it from PATCH it’s always undefined.
Checked both requests in the network tab in dev tools and there both requests have something in the body.
const handleResponse = (details: chrome.webRequest.WebRequestBodyDetails): void | chrome.webRequest.BlockingResponse => {
switch (details.method) {
case "POST":
case "PATCH":
console.log(details.requestBody);
break;
}
}
chrome.webRequest.onBeforeRequest.addListener(
handleResponse,
{ urls: ["*://*.dynamics.com/api/data/v*"] },
['requestBody']
);
I have these premissions defined in the manifest.
"permissions": [
"storage",
"tabs",
"webRequest",
"sidePanel"
]
Is there a documented issue with PATCH requests?
New contributor
Ivan Ficko is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.