mswjs / interceptors

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

fix(ClientRequest): respect "options.path" over "url.pathname" #441

Closed mikicho closed 11 months ago

mikicho commented 11 months ago

Currently, we ignore the path from the second argument.

@kettanaito When I do:

url.pathname = "/user?id=123"

It's automatically encodes it. Are we ok with this? see the exepct request.url line

kettanaito commented 11 months ago

There are more ways to construct http.ClientRequest than there are stars in the sky.

kettanaito commented 11 months ago

@mikicho, everything looks good from my side. Let me know if we haven't missed anything, and we can merge then. Thanks!

mikicho commented 11 months ago

LGTM

kettanaito commented 11 months ago

Released: v0.25.5 🎉

This has been released in v0.25.5!

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.