mswjs / interceptors

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

Use "urlToHttpOptions" from "node:url" #500

Open kettanaito opened 5 months ago

kettanaito commented 5 months ago

The standard node:url module ships with a urlToHttpOptions function that produces ClientRequest options from the given url. We can use that instead of the custom logic we have in normalizing the client request arguments for better stability and performance.