mswjs / interceptors

Low-level network interception library.
https://npm.im/@mswjs/interceptors
MIT License
537 stars 123 forks source link

feat: remove "headers-polyfill" dependency #408

Closed kettanaito closed 1 year ago

kettanaito commented 1 year ago

We can fully rely on the Fetch API Headers instead of using the headers-polyfill library.

We can substitute some of the utility functions of that library by Array.from(headers.entries()), and I've added a custom utility that converts XMLHttpRequest.getAlLResponseHeaders() string to a Headers instance (that one wasn't included in the polyfill library anyway).

kettanaito commented 1 year ago

Released: v0.24.0 🎉

This has been released in v0.24.0!

Make sure to always update to the latest version (npm i @mswjs/interceptors@latest) to get the newest features and bug fixes.


Predictable release automation by @ossjs/release.