File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -97,6 +97,19 @@ These are the available config options for making requests. Only the `url` is re
9797 // `Authorization` custom headers you have set using `headers`.
9898 // Please note that only HTTP Basic auth is configurable through this parameter.
9999 // For Bearer tokens and such, use `Authorization` custom headers instead.
100+
101+ // When using axios instances with pre-configured `auth`, you can override
102+ // or bypass the instance's basic auth configuration in individual requests:
103+ //
104+ // 1. Override with different credentials:
105+ // instance.get('/path', { auth: { username: 'other', password: 'pass' } })
106+ //
107+ // 2. Bypass basic auth and use a custom Authorization header:
108+ // instance.get('/path', { auth: null, headers: { Authorization: 'Bearer token' } })
109+ //
110+ // Note: If you don't set `auth: null`, the instance's pre-configured basic auth
111+ // will take precedence over any `Authorization` header you set in the request config.
112+
100113 auth: {
101114 username: ' janedoe' ,
102115 password: ' s00pers3cret'
You can’t perform that action at this time.
0 commit comments