You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 intoClientRequest
. 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.
The text was updated successfully, but these errors were encountered: