Independent Node.js Headers module #35
Replies: 5 comments 21 replies
-
One important aspect of a headers module would be that it standardizes how headers are handled across node ecosystem. Any sort of Headers class will never beat the performance of just a regular object, but I think we could create something as-performant-as-possible and then also provide utilities that allow for even faster use cases. One such example I'm thinking of is if a module wants to manage headers using an array. We could provide utilities that operate specifically for arrays; or we at least provide the core APIs necessary to do so. Normalization, validation, joining, etc. |
Beta Was this translation helpful? Give feedback.
-
Writing an implementation using V8 internals or compiling to WASM is a great idea. Llhttp has proven that is a great solution for generally non-performant Web compatibility things |
Beta Was this translation helpful? Give feedback.
-
Copying pasting relevant comment thread from a recent Headers related PR that has some additional ideas: #36 (comment) |
Beta Was this translation helpful? Give feedback.
-
#32 has sparked an interesting discussion about Headers in Node.js
I'm very open to the idea of a standalone headers core module for Node.js. We could contribute this directly to Node core or it can exist similar to nodejs/undici repo for now. This standardization would be very helpful for libraries such as undici, undici-fetch, and many others.
WDYT?
Beta Was this translation helpful? Give feedback.
All reactions