-
Notifications
You must be signed in to change notification settings - Fork 165
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
fetch instead of axios #307
Comments
Totally agree. Just need fetch to be in a node lts release.
…On Tue, 25 Oct 2022, 20:46 David Konsumer, ***@***.***> wrote:
If this library used fetch instead of axios (with cross-fetch as a
polyfill for environments that don't have fetch) it would be usable in
other js environments (deno, bun, cloudflare workers, maybe even browser!)
Possible Solution
Remove dependencies on axios, and use cross-fetch and standard fetch API
<https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API>.
I have seen browser-nano <https://github.com/achesco/browser-nano> but
haven't tested. It may already have support for this. This might be a nice
way to merge these projects. It has a very thin wrapper
<https://github.com/achesco/browser-nano/blob/master/lib/index.js> to
monkey-patch nano.
Context
For me specifically, it would enable me to use nano/couch more easily,
directly with cloudflare workers (which have fetch built-in.)
—
Reply to this email directly, view it on GitHub
<#307>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFKMRNJKYYTZNSRYQSUYDLWFA2IZANCNFSM6AAAAAAROJMI3E>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
3 tasks
Great to move to fetch. Just a note: I am still using nano version 8.2.3 as there are some cookie problems - in my setup - using nano versions 9.x and 10.x. Thanks for all the work, it is greatly appreciated! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If this library used
fetch
instead of axios (with cross-fetch as a polyfill for environments that don't havefetch
) it would be usable in other js environments (deno, bun, cloudflare workers, maybe even browser!)Possible Solution
Remove dependencies on axios, and use cross-fetch and standard fetch API.
I have seen browser-nano but haven't tested. It may already have support for this. This might be a nice way to merge these projects. It has a very thin wrapper to monkey-patch nano.
Context
For me specifically, it would enable me to use nano/couch more easily, directly with cloudflare workers (which have
fetch
built-in.)The text was updated successfully, but these errors were encountered: