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
msw doesn't seem to support binary responses because it decodes them to
a UTF-8 string. To work around that, we will do a separate fetch of the
file and save that.
// msw currently doesn't support binary response bodies, so we need to download this separately
192
+
// see https://github.com/mswjs/interceptors/blob/15eafa6215a328219999403e3ff110e71699b016/src/interceptors/ClientRequest/utils/getIncomingMessageBody.ts#L24-L33
193
+
// Essentially, mws is trying to decode a ZIP file as UTF-8 which changes the bytes and corrupts the file.
194
+
constresponse=awaitfetch(url,{
195
+
headers: {
196
+
// We need to ensure we don't end up in an infinite loop, since this request will also be intercepted
0 commit comments