imagekit-nodejs
imagekit-nodejs copied to clipboard
Feature Request: Allow adapters for axios requests
trafficstars
Feature Request
Allow adapters for axios requests
The Problem:
The SDK currently uses axios with its default adapter to make requests. However in serverless environments (Cloudflare Pages in my scenario), axios with XMLHTTPRequest is not always an option, see this. Instead the Fetch API should be used.
Solution
Axios allows the introduction of adapters as part of its request config. This option simply needs to be exposed. Exisiting adapters such as @vespaiach/axios-fetch-adapter can be used directly.