cross-fetch
cross-fetch copied to clipboard
Add support for agent property from node-fetch
I'd like to ignore https errors for one specific endpoint using node.js.
In node-fetch this can be done using the agent property, the problem is that it's not exposed in typescript so the code doesn't transpile. Currently I've "solved" it by retyping it as any which is far from ideal.
Adding support for the agent property would be great.
I agree. I instead used ts-ignore like:
const req = await fetch(..., {
...
// @ts-ignore
agent: ...
});
cross-fetch version: 4.0.0