Skip to content

fix(types): default request headers types#4117

Closed
lukashroch wants to merge 2 commits intoaxios:masterfrom
lukashroch:default-headers
Closed

fix(types): default request headers types#4117
lukashroch wants to merge 2 commits intoaxios:masterfrom
lukashroch:default-headers

Conversation

@lukashroch
Copy link
Copy Markdown
Contributor

@lukashroch lukashroch commented Oct 1, 2021

Commit 90205f8 introduced more correct headers types.

However this introduced type issues as request headers are not the same for default request headers (they are distinguished by request method + "common" https://github.com/axios/axios/blob/master/lib/defaults.js#L119), which is causing type issues when working with defaults (#4108). Following change provides proper types for defaults.

edit: added correct type for instance creation as well.

@tienhoangkhmt
Copy link
Copy Markdown

image
i am getting this error in latest version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants