You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 12, 2022. It is now read-only.
However using a Request instance results in an error.
➜ node
> const fetch = require('make-fetch-happen');
undefined
> const Request = require('node-fetch').Request;
undefined
> fetch(new Request('https://google.com')).then(console.log)
TypeError: Parameter "url" must be a string, not object
at Url.parse (url.js:102:11)
at Object.urlParse [as parse] (url.js:96:13)
at getProxyUri (/Users/michaelmifsud/src/shop/app/node_modules/make-fetch-happen/agent.js:116:24)
at getAgent (/Users/michaelmifsud/src/shop/app/node_modules/make-fetch-happen/agent.js:14:17)
at remoteFetch (/Users/michaelmifsud/src/shop/app/node_modules/make-fetch-happen/index.js:310:17)
at cachingFetch (/Users/michaelmifsud/src/shop/app/node_modules/make-fetch-happen/index.js:176:10)
at repl:1:1
at ContextifyScript.Script.runInThisContext (vm.js:50:33)
at REPLServer.defaultEval (repl.js:239:29)
at bound (domain.js:301:14)
From a glance at the code the first parameter to fetch is generally assumed to be a string.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The documentation states
However using a
Request
instance results in an error.From a glance at the code the first parameter to
fetch
is generally assumed to be a string.The text was updated successfully, but these errors were encountered: