Skip to content

Can MSW mock Brotli-compressed responses? #2186

Answered by kettanaito
franky47 asked this question in Q&A
Discussion options

You must be logged in to vote

Update

mswjs/interceptors#604 will handle Brotli (and other) decompression for fetch in Node.js.

As for the browser, I expect the native fetch API to do the decompression for you once the worker sends it the compressed response instance. If it doesn't, I don't support we should be decompressing it either since that's how fetch behaves by default.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by franky47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants