fetch
fetch copied to clipboard
Feature Request: Add support for passing Request object
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?