Closed xpuu closed 4 years ago
Hi @xpuu,
node-fetch
needs an AbortController
polyfill to support that feature. (as written in the documentation)
const fetch = require('node-fetch')
const AbortController = require('abort-controller')
const wretch = require('wretch')
wretch('https://duckduckgo.com')
.polyfills({ fetch, AbortController })
.get()
.setTimeout(1)
.text(console.log)
// -> AbortError: The user aborted a request.
More info here.
Wow, that was quick! Once again thanks for your support.
This code (running in node v14.4.0)
results with
Any idea what's wrong? Thanks in advance.