undici
undici copied to clipboard
Implement fetch methods
Under lib/fetch/util.js
we have a few helper methods that are pretty well documented in spec and and needs to be implemented:
- [ ] appendRequestOriginHeader
- [ ] appendFetchMetadata
- [ ] TAOCheck
- [ ] corsCheck
- [ ] crossOriginResourcePolicyCheck
- [ ] makePolicyContainer
- [ ] clonePolicyContainer
- [ ] determineRequestsReferrer
@szmarczak
I'd like to help!
Though I have a question: do we need to implement those browser related features such as cors, content security policy in undici fetch?
Some of those are indeed only browser related, you can either implement them if possible or add a note explaining why we don't need to implement them and return a appropriate value or an assertion.
I'd like to confirm what we think about cors
related features, for example, mode
is currently supported, while it's unimplemented in node-fetch. Do we want to support them as much as we can? Or are they unnecessary complexities?
Browser-related features might be useful when used with https://github.com/jsdom/jsdom but I don't have any use case for this.
I'd like to confirm what we think about
cors
related features, for example,mode
is currently supported, while it's unimplemented in node-fetch. Do we want to support them as much as we can? Or are they unnecessary complexities?
We implement them because it's easy to just follow the spec literally.
It also supports isomorphic javascript.
Hey there is it okay if I try to implement some of them? :D
@KhafraDev is there anything left to implement?
No, everything is done.