Skip to content

Axios Instance Documentation can do with some elaboration, as some functionality is left to be assumed #6846

@mickeypuri

Description

@mickeypuri

Section/Content To Improve

The Axios Documentation is very clear, that you can make a request using axios(config)

However The Axios Instance Documentation does not mention anywhere that you can make a request using myAxiosInstance(config) and the documentation simply lists the convenience methods on the Axios Instance.

Suggested Improvement

I feel it would be an improvement to mention explicitly in the section on Axios Instance, that we can also make a request using the Axios Instance directly by calling it with a config, and not just having to invoke a convenience method on it.

Its important to know this usage of the axios instance, as in cases where one is doing an error recovery, we may not know the original method, yet we can recover the config and do a retry, by passing the config to the instance.

e.g. myAxiosInstance(config)

I am using this approach in an npm module axios-token-manager that I've written to do error recovery with oAuth tokens, but while reviewing it, I noticed that the axios documentation doesn't make this feature explicit.

Relevant File(s)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions