-
-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Description
While Node v17 introduced the Fetch API from browsers, Node v18 made it non-experimental. Mitm.js's low-level implementation already hooks into the TCP connection the Fetch implementation does, but doesn't trigger request on Mitm's instance. For access to the HTTP request, Mitm.js hooked into ClientRequest. With Fetch, it'd need to hook somewhere else.
Alternatively Mitm.js could run Node.js's HTTP server/parser on the TCP connection, but we wouldn't know which connection is meant to be mocked as an HTTP connection and which as not. If we could get that info from the programmer, that'd be a breaking change. Better support Fetch with the current Mitm.js API and look into more flexibility in the future.
Metadata
Metadata
Assignees
Labels
No labels