fetch icon indicating copy to clipboard operation
fetch copied to clipboard

Feature Request: Add support for passing Request object

Open TillaTheHun0 opened this issue 2 years ago • 0 comments

Vanilla fetch supports passing a Request object as its first parameter. This works really great for flows that incrementally build out a Request object to then pass to fetch.

This API is also supported in node-fetch, which exports a Request implementation in its package. But when wrapping node-fetch with @vercel/fetch, and passing a Request object, an error is thrown: The "url" argument must be of type string. Received an instance of Request. This means none of our flows that worked with node-fetch and vanilla fetch will work with @vercel/fetch.

Is there any intention on supporting passing a Request object, as is described in the fetch spec?

TillaTheHun0 avatar Sep 07 '21 16:09 TillaTheHun0