Sets the default polyfills that will be stored internally when instantiating wretch objects. Useful for browserless environments like node.js.
node.js
Needed for libraries like fetch-ponyfill.
import wretch from "wretch"wretch.polyfills({ fetch: require("node-fetch"), FormData: require("form-data"), URLSearchParams: require("url").URLSearchParams,});// Uses the above polyfills.wretch("...").get().res();
An object containing the polyfills
If true, replaces the current polyfills instead of mixing in
Generated using TypeDoc
Sets the default polyfills that will be stored internally when instantiating wretch objects. Useful for browserless environments like
node.js
.Needed for libraries like fetch-ponyfill.