ballercat / jambox

CLI tool for recording and playing back networks requests for node & Frontend Apps.
MIT License
11 stars 2 forks source link

Support proxying for native fetch requests #52

Closed hamlim closed 7 months ago

hamlim commented 7 months ago

This change patches undici which is what globalThis.fetch uses in modern Node versions (18+), allowing for native fetches to also be routed through the proxy (mockttp) in Jambox!

Closes: https://github.com/ballercat/jambox/issues/51

Screenshots:

No cache, block network requests:

Screenshot by Dropbox Capture

Cache, block network requests:

Screenshot by Dropbox Capture

Cache, edited response, block network requests:

Screenshot by Dropbox Capture

hamlim commented 7 months ago

Updated and got it working, so far I only manually tested this in the recipe Next app - but happy to write an actual test for this if you can share some pointers for where I could add one!

sonarcloud[bot] commented 7 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud