Skip to content

adding create instance config type as AxiosRequestConfig does not if always#4191

Closed
Edmu wants to merge 1 commit intoaxios:masterfrom
Edmu:4184-adding-instance-config-type
Closed

adding create instance config type as AxiosRequestConfig does not if always#4191
Edmu wants to merge 1 commit intoaxios:masterfrom
Edmu:4184-adding-instance-config-type

Conversation

@Edmu
Copy link
Copy Markdown

@Edmu Edmu commented Oct 15, 2021

Fixes #4184

Allows to pass different type of axios config (modified AxiosRequestConfig) for axios.create. So code example below does not throw typescript error.

axios.create({ ..., headers: { get: { 'common-header-for-get': 'value' }, 'some-header-for-all-methods': 'value' }, });

which works fine if using javascript lib version w/o typescript.

…fore were not allowing to pass get, post etc. records
@jasonsaayman
Copy link
Copy Markdown
Member

Seems this has already been addressed by another pull request, please re-open if I am mistaken 😄

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.

Config header types are wrong in Axios.create

3 participants