-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature request: configurations for replacing native fetch #70
Comments
Hey @ZeroCho this is a fair request, I'll look into adding a configurable fetch. We considered it initially, that's why cross-fetch is there, but the lack of control on how different consumers call the service can create a variety of errors we can't control or even easily debug, so that's why we currently lean against it. I'm curious about the case you mentioned, does Datadog patch the global fetch? |
@drochetti Thank you for your reply. Yes, datadog patches global fetch and that causes a problem now. So it has a memory leak issue that even after an image generation is finished with fal, a fal agent keeps memory of images. I found out that it was not the problem of fal, but the problem of fetch that datadog patched. That's why I wanna change fetch function. |
Thank you! It works like a charm! |
Currently, fal-js uses native fetch, but I think it is good to have configurations for changing a default network request function to
axios
orcross-fetch
orgot
.Also, I found out that
cross-fetch
is inpackage.json
but it seems that it is not used in this package. I opened this issue, because I want to usecross-fetch
instead of nativefetch
, becausefetch
has memory leak issue with datadog service that I'm using.The text was updated successfully, but these errors were encountered: