-
Notifications
You must be signed in to change notification settings - Fork 151
Closed
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
Describe the change
The readme suggest using ProxyAgent to bypass SSL errors. However, this is not possible since uri is required in ProxyAgent. Instead, use undici's Agent.
import { Agent } from "undici";
import { ofetch } from "ofetch";
//// Note: This makes fetch unsecure against MITM attacks. USE AT YOUR OWN RISK!
const unsecureAgent = new Agent({ connect: { rejectUnauthorized: false } });
const unsecureFetch = ofetch.create({ dispatcher: unsecureAgent });
const data = await unsecureFetch("https://self-signed.badssl.com");URLs
Additional information
- Would you be willing to help?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation

