Skip to content
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

Not compatibility with Cloudflare Workers #519

Open
looch opened this issue Aug 20, 2023 · 6 comments
Open

Not compatibility with Cloudflare Workers #519

looch opened this issue Aug 20, 2023 · 6 comments

Comments

@looch
Copy link

looch commented Aug 20, 2023

Trace: Error: The 'credentials' field on 'RequestInitializerDict' is not implemented.

And

Your worker created multiple branches of a single stream (for instance, by calling response.clone() or request.clone()) but did not read the body of both branches. This is wasteful, as it forces the system to buffer the entire stream of data in memory, rather than streaming it through. This may cause your worker to be unexpectedly terminated for going over the memory limit. If you only meant to copy the request or response headers and metadata (e.g. in order to be able to modify them), use the appropriate constructors instead (for instance, new Response(response.body, response), new Request(request), etc).

@XantreDev
Copy link

Crazy that this is still an issue. Which wrapper around fetch can anyone recommend?

@sphr2k
Copy link

sphr2k commented Feb 21, 2024

@haverstack/axios-fetch-adapter works for me.

@XantreDev
Copy link

XantreDev commented Feb 21, 2024

axios weight is huge. It's not the a good thing for my use case

@suhaotian
Copy link

suhaotian commented Mar 8, 2024

@XantreGodlike Do you want give a try of xior ? gzip less than 3kb

@XantreDev
Copy link

XantreDev commented Mar 8, 2024

@suhaotian it's fixed in ky by now. But I will continue using fetch for my use case

@suhaotian
Copy link

@XantreGodlike Nice! xior use fetch too, similar axios API, if you want more plugins, xior is your choice.. Thanks reply :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants