axios
axios copied to clipboard
Multiple Headers types and usage. How it has changed?
Section/Content To Improve
About headers typing and usage. Before 1.0.0, it was just a plain object that we could index natively as any other. After 1.0.0, it is composed in a more complex way, with many typings and unions:
(https://github.com/axios/axios/blob/484aa4fe6addccbd32206a31eb3d2d000843066e/index.d.ts#L2-L77)
Suggested Improvement
Maybe I understood it wrong, tried to find its original PR to learn more and seems that it was introduced with ES2017 migration and its big refactor.
Can you clarify how axios is handling headers at v1.0.0? Should it require a dedicated place on the documentation?