-
-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose formData
method on incoming request from the interceptor
#288
Comments
Hey, @cliffordfajardo. Thanks for raising this. Some request reading methods like With the recent proposal to adhere to Fetch What do you think? |
There's also some discussion on this in mswjs/msw#1327 (comment). |
I think this would be a good idea, I'll look around for a polyfill and try it on the IsomorphicRequest request References |
@kettanaito - have you seen the @remix-run/web-fetch package from the Remix team? With your history and context of the codebase do you think IsomorphicRequest.ts could be replaced with request from @remix-run/web-fetch or a slighly modified fork ? Maybe
From EDIT
|
Yes! I think migrating to Remix's polyfill is the best option. We can use it internally for now and in the future expose publicly to MSW consumers. |
With #292 I'm migrating this library to use Fetch API Request and Response instances. That will also expose This issue is therefore obsolete. It will be closed once that API change lands. |
Released: v0.18.0 🎉This has been released in v0.18.0! Make sure to always update to the latest version ( Predictable release automation by @ossjs/release. |
I was using Remix and had tried to do the following in my server.js file (I'm using Remix express template)
In my remix app I was attempting to capture a request from my server and rewrite the request (proxy the request) so that an external API provider thinks its coming from my proxy server (example-proxy.com). Details here I wrote up a stackoverflow question
Aside
Then I remembered that formData, Request, fetch were only introduced a few months ago in in nodejs v18
Would bringing in
formData
be contingent upon this discussion that Kent wrote or the work @milesrichardson is doing to migrate this library to node v18?The text was updated successfully, but these errors were encountered: