node-fetch-native
node-fetch-native copied to clipboard
Support custom agents with `rejectUnauthorized: false`
Describe the feature
We're building an SDK and we'd like to give users a method that disables SSL verification so they can get things working in their development environment.
It'd be nice to have a simpler version of the createProxy function that just creates an agent, adapting parameters between node-fetch and undici fetch
For example:
import { fetch } from 'node-fetch-native'
import { createAgent } from 'node-fetch-native/agent'
const agent = createAgent({ rejectUnauthorized: false });
fetch('https://localhost:4444/api', { ...agent })
PoC here: https://github.com/loks0n/node-fetch-native/commit/1fe41524d846f481eb96db43b8a3c79b1afa59da
Additional information
- [X] Would you be willing to help implement this feature?