Firefox PATCH request only intercepted once
See original GitHub issueEnvironment
Name | Version |
---|---|
msw | ^0.19.5 |
browser | Firefox |
OS | MacOS |
Request handlers
// Example of declaration. Provide your code here.
import { setupWorker, rest } from 'msw'
const worker = setupWorker(
rest.patch('area-code', (req, res, ctx) => {
return res(ctx.status(200), ctx.json({ ...req.body }))
}),
rest.patch('activate', (req, res, ctx) => {
return res(ctx.status(200), ctx.json({}))
}),
)
worker.start()
Actual request
fetch
// Example of making a request. Provide your code here.
useMutation(() =>
fetch(`${baseUrl}${path}`, { headers, method, body }))
Current behavior
The PATCH
request is only processed once. Either on the same route or a different route. This works fine in Chrome.
Expected behavior
Every request that matches should get intercepted.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Show ServiceWorkers intercepted network requests in the ...
With this patch we show something in the devtools network panel. It doesn't work fully because of bug 1158533. Plus would be nice...
Read more >Intercept HTTP requests - Mozilla - MDN Web Docs
To intercept HTTP requests, use the webRequest API. This API enables you to add listeners for various stages of making an HTTP request....
Read more >Large response bodies (over 1MiB) are truncated, even in HAR
Bug 1223726 - Customize response body interception; ... Summary: currupted data dump - Network Monitor - Firefox Developer Tools → corrupted data dump ......
Read more >log service worker interception errors to the console for non ...
Utility method for logging intercepted channel errors. Note, this is main thread only, though, so I will need some runnable bouncing in the...
Read more >Security Vulnerabilities fixed in Firefox 107 - Mozilla
#CVE-2022-45405: Use-after-free in InputStream implementation ... #CVE-2022-45410: ServiceWorker-intercepted requests bypassed SameSite ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yep, I can’t recreate it on a new application even with the same route structure. I can on another application. Time for me to look at what version of dependencies are there. If it has anything to do with MSW, I’ll open this again.
It just fails to intercept the second call, but not an issue in Chrome.
@marcosvega91 I’ll see if I can get a repo up tomorrow with the issue in it.