-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Hey,
Im failing to implement this library for node-fetch, and maybe you will have some idea:
import https from 'https';
// @ts-ignore
import { lookup } from 'lookup-dns-cache';
const dnsAgent = (): https.Agent => new https.Agent({
lookup: lookup(4),
keepAlive: true,
});
// and then usage within fetch
await fetch(uri, {
method: 'POST',
body: JSON.stringify(requestParams),
headers: { 'Content-Type': 'application/json' },
agent: dnsAgent,
});
It fails with an error "options must be an object or an ip version number"
which I see in library code, but passing object {family: 4} also causes same failure
Metadata
Metadata
Assignees
Labels
No labels