feat(http): add headers and methods to the http namespace#4304
feat(http): add headers and methods to the http namespace#4304halvardssm wants to merge 2 commits intodenoland:mainfrom
Conversation
|
We are probably not accepting I'm not sure about (Feedbacks on this PR from the community are welcome.) |
|
For the methods, I followed the RFC 9110 list, but after researching a bit more, it seems that the standard methods are maintained at IANA. Is it this list that did not find a consensus? It seems to me that there are two categories here, webdav and standard HTTP. I think it would at least be beneficial to have the standard headers present, but I wouldn't see an issue with having all of them either (we can just split them up). For headers, I would probably change it to reflect this list at IANA, but separate it by status. |
Some preferred to list only RFC 9110 ones. Some preferred RFC 9110 + IANA methods. Some preferred what Node.js lists in
Maybe a good idea, but can you split it to another PR? I think header.ts and method.ts require independent discussions. |
Wouldn't this be solved by having two groups? One for RFC 9110 and one for IANA, and then have one export that combines the two (alternatively also have a node headers export for compatibility)? It somehow feels like removing them altogether is not the optimal solution.
Sure, Ill submit another PR 💪🏻 |
Hi!
I am submitting this PR as I see the usefulness of HTTP methods and headers to be available in this typed and shorthand matter. The headers and methods are crawled from MDN, and thus also linked. I am not sure how to deal with the copyright, so feedback is appreciated in case I did not do this correctly.
Please let me know if anything needs to be changed.