Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for agent property from node-fetch #176

Open
RikudouSage opened this issue Oct 18, 2023 · 1 comment
Open

Add support for agent property from node-fetch #176

RikudouSage opened this issue Oct 18, 2023 · 1 comment

Comments

@RikudouSage
Copy link

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.

@lewisjr
Copy link

lewisjr commented Nov 22, 2023

I agree. I instead used ts-ignore like:

const req = await fetch(..., {
   ...
   // @ts-ignore
   agent: ...
});

cross-fetch version: 4.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants