Breaking changes
- The
response
instance in the life-cycle events now handlesresponse.headers
as theHeaders
instance (#660).
server.on('response:bypass', (res) => {
- res.headers['content-type']
+ res.headers.get('content-type')
})
- Calling
setupServer
no longer applies request interception immediately. Instead, it's applied when calledserver.listen()
(#660).
Bug fixes
- Fixes the order of events in the intercepted
XMLHttpRequest
in Node.js (mswjs/interceptors#102). - Fixes an issue that resulted in the "TypeError [ERR_INVALID_PROTOCOL]: Protocol "http:" not supported. Expected "https:"" exception when using MSW with
superagent
(#632).
Internal
- Updates dependencies (@mswjs/interceptors, headers-utils).