Now that we have all the primitives, websocket interception should be (1) http-to-ws protocol upgrade listener via http interceptor; (2) direct WebSocket class patch for direct connections.
This will allow us to intercept any websocket connection, not just those made via the global WebSocket class, and also eliminate any need in customizing interceptors or MSW (see mswjs/msw#2742).
Now that we have all the primitives, websocket interception should be (1) http-to-ws protocol upgrade listener via http interceptor; (2) direct
WebSocketclass patch for direct connections.This will allow us to intercept any websocket connection, not just those made via the global
WebSocketclass, and also eliminate any need in customizing interceptors or MSW (see mswjs/msw#2742).