fal-ai / fal-js

The JavaScript client and utilities to fal-serverless with built-in TypeScript definitions
https://fal.ai
MIT License
91 stars 19 forks source link

feat(client): allow custom fetch impl #74

Closed drochetti closed 4 months ago

drochetti commented 4 months ago

This PR introduces the fetch function as a config option. It expects the function to follow the fetch signature and behavior, so node-fetch, isomorphic-fetch and similar can be use as a drop-in. When using HTTP clients such as Axios, one needs to write their own adapter function or use something like https://github.com/lifeomic/axios-fetch

drochetti commented 4 months ago

This addresses #70