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
Implementing the net.Socket interceptor interface.
Refactoring ClientRequest (and potentially XHR) interceptors to rely on the Socket interceptor. These higher level interceptors would only concern themselves with parsing the socket packets and deciding whether a particular connection should be intercepted, then controlling it.
Design some sort of manager that would "lock" socket instances behind certain interceptors. This is to avoid issues when a single request can be handled by multiple interceptors (see Deprecate "X-Request-Id" in favor of another request deduplication algorithm #378). Once we bring the interception to the socket level, all requests will be covered by that interceptor and subsequent higher interceptors that extend it.
The text was updated successfully, but these errors were encountered:
Since https://github.com/mswjs/interceptors/releases/tag/v0.32.0, we now technically can implement a
net.Socket
interceptor that would allow us to interceptClientRequest
but also any agents using sockets directly, like Undici.This task would involve:
net.Socket
interceptor interface.The text was updated successfully, but these errors were encountered: