axios icon indicating copy to clipboard operation
axios copied to clipboard

Multiple Headers types and usage. How it has changed?

Open arthurfiorette opened this issue 3 years ago • 0 comments

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?

Relevant File(s)

arthurfiorette avatar Oct 05 '22 00:10 arthurfiorette