Skip to content

[Added] instance call with config #254

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

theo-sim-dev
Copy link

Fixes #252

What's Added

  • A new section: "Calling the instance with a config object" (in English and other languages)
  • Code example showing instance({ url, method }) usage
  • Example retry pattern using error.config in an interceptor (commonly used in token refresh scenarios)

Why This Matters

While this behavior is supported and commonly used, it is not explicitly mentioned in the instance docs. Many developers discover it only through source code or trial-and-error. Documenting it helps with:

  • Discoverability of advanced usage
  • Retry logic based on error.config
  • Cleaner, DRY error handling implementations

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docs should clarify that Axios instances are callable functions
1 participant