axios 1.7.9 → 1.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +200 -0
- package/README.md +62 -37
- package/dist/axios.js +438 -327
- package/dist/axios.js.map +1 -1
- package/dist/axios.min.js +2 -1
- package/dist/axios.min.js.map +1 -1
- package/dist/browser/axios.cjs +369 -249
- package/dist/browser/axios.cjs.map +1 -1
- package/dist/esm/axios.js +369 -249
- package/dist/esm/axios.js.map +1 -1
- package/dist/esm/axios.min.js +2 -1
- package/dist/esm/axios.min.js.map +1 -1
- package/dist/node/axios.cjs +491 -253
- package/dist/node/axios.cjs.map +1 -1
- package/index.d.cts +26 -10
- package/index.d.ts +16 -7
- package/lib/adapters/adapters.js +6 -4
- package/lib/adapters/fetch.js +220 -163
- package/lib/adapters/http.js +19 -1
- package/lib/adapters/xhr.js +11 -8
- package/lib/core/Axios.js +13 -4
- package/lib/core/AxiosError.js +10 -3
- package/lib/core/AxiosHeaders.js +15 -3
- package/lib/core/buildFullPath.js +3 -2
- package/lib/core/dispatchRequest.js +1 -1
- package/lib/core/mergeConfig.js +1 -1
- package/lib/defaults/index.js +1 -1
- package/lib/env/data.js +1 -1
- package/lib/helpers/buildURL.js +1 -3
- package/lib/helpers/estimateDataURLDecodedBytes.js +73 -0
- package/lib/helpers/formDataToStream.js +4 -3
- package/lib/helpers/resolveConfig.js +14 -10
- package/lib/helpers/throttle.js +1 -1
- package/lib/helpers/toFormData.js +4 -0
- package/lib/helpers/toURLEncodedForm.js +4 -3
- package/lib/platform/node/index.js +26 -0
- package/lib/utils.js +52 -28
- package/package.json +24 -12
- package/SECURITY.md +0 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,205 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
# [1.12.0](https://github.com/axios/axios/compare/v1.11.0...v1.12.0) (2025-09-11)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* adding build artifacts ([9ec86de](https://github.com/axios/axios/commit/9ec86de257bfa33856571036279169f385ed92bd))
|
|
9
|
+
* dont add dist on release ([a2edc36](https://github.com/axios/axios/commit/a2edc3606a4f775d868a67bb3461ff18ce7ecd11))
|
|
10
|
+
* **fetch-adapter:** set correct Content-Type for Node FormData ([#6998](https://github.com/axios/axios/issues/6998)) ([a9f47af](https://github.com/axios/axios/commit/a9f47afbf3224d2ca987dbd8188789c7ea853c5d))
|
|
11
|
+
* **node:** enforce maxContentLength for data: URLs ([#7011](https://github.com/axios/axios/issues/7011)) ([945435f](https://github.com/axios/axios/commit/945435fc51467303768202250debb8d4ae892593))
|
|
12
|
+
* package exports ([#5627](https://github.com/axios/axios/issues/5627)) ([aa78ac2](https://github.com/axios/axios/commit/aa78ac23fc9036163308c0f6bd2bb885e7af3f36))
|
|
13
|
+
* **params:** removing '[' and ']' from URL encode exclude characters ([#3316](https://github.com/axios/axios/issues/3316)) ([#5715](https://github.com/axios/axios/issues/5715)) ([6d84189](https://github.com/axios/axios/commit/6d84189349c43b1dcdd977b522610660cc4c7042))
|
|
14
|
+
* release pr run ([fd7f404](https://github.com/axios/axios/commit/fd7f404488b2c4f238c2fbe635b58026a634bfd2))
|
|
15
|
+
* **types:** change the type guard on isCancel ([#5595](https://github.com/axios/axios/issues/5595)) ([0dbb7fd](https://github.com/axios/axios/commit/0dbb7fd4f61dc568498cd13a681fa7f907d6ec7e))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* **adapter:** surface low‑level network error details; attach original error via cause ([#6982](https://github.com/axios/axios/issues/6982)) ([78b290c](https://github.com/axios/axios/commit/78b290c57c978ed2ab420b90d97350231c9e5d74))
|
|
21
|
+
* **fetch:** add fetch, Request, Response env config variables for the adapter; ([#7003](https://github.com/axios/axios/issues/7003)) ([c959ff2](https://github.com/axios/axios/commit/c959ff29013a3bc90cde3ac7ea2d9a3f9c08974b))
|
|
22
|
+
* support reviver on JSON.parse ([#5926](https://github.com/axios/axios/issues/5926)) ([2a97634](https://github.com/axios/axios/commit/2a9763426e43d996fd60d01afe63fa6e1f5b4fca)), closes [#5924](https://github.com/axios/axios/issues/5924)
|
|
23
|
+
* **types:** extend AxiosResponse interface to include custom headers type ([#6782](https://github.com/axios/axios/issues/6782)) ([7960d34](https://github.com/axios/axios/commit/7960d34eded2de66ffd30b4687f8da0e46c4903e))
|
|
24
|
+
|
|
25
|
+
### Contributors to this release
|
|
26
|
+
|
|
27
|
+
- <img src="https://avatars.githubusercontent.com/u/22686401?v=4&s=18" alt="avatar" width="18"/> [Willian Agostini](https://github.com/WillianAgostini "+132/-16760 (#7002 #5926 #6782 )")
|
|
28
|
+
- <img src="https://avatars.githubusercontent.com/u/12586868?v=4&s=18" alt="avatar" width="18"/> [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+4263/-293 (#7006 #7003 )")
|
|
29
|
+
- <img src="https://avatars.githubusercontent.com/u/53833811?v=4&s=18" alt="avatar" width="18"/> [khani](https://github.com/mkhani01 "+111/-15 (#6982 )")
|
|
30
|
+
- <img src="https://avatars.githubusercontent.com/u/7712804?v=4&s=18" alt="avatar" width="18"/> [Ameer Assadi](https://github.com/AmeerAssadi "+123/-0 (#7011 )")
|
|
31
|
+
- <img src="https://avatars.githubusercontent.com/u/70265727?v=4&s=18" alt="avatar" width="18"/> [Emiedonmokumo Dick-Boro](https://github.com/emiedonmokumo "+55/-35 (#6998 )")
|
|
32
|
+
- <img src="https://avatars.githubusercontent.com/u/47859767?v=4&s=18" alt="avatar" width="18"/> [Zeroday BYTE](https://github.com/opsysdebug "+8/-8 (#6980 )")
|
|
33
|
+
- <img src="https://avatars.githubusercontent.com/u/4814473?v=4&s=18" alt="avatar" width="18"/> [Jason Saayman](https://github.com/jasonsaayman "+7/-7 (#6985 #6985 )")
|
|
34
|
+
- <img src="https://avatars.githubusercontent.com/u/13010755?v=4&s=18" alt="avatar" width="18"/> [최예찬](https://github.com/HealGaren "+5/-7 (#5715 )")
|
|
35
|
+
- <img src="https://avatars.githubusercontent.com/u/7002604?v=4&s=18" alt="avatar" width="18"/> [Gligor Kotushevski](https://github.com/gligorkot "+3/-1 (#5627 )")
|
|
36
|
+
- <img src="https://avatars.githubusercontent.com/u/15893?v=4&s=18" alt="avatar" width="18"/> [Aleksandar Dimitrov](https://github.com/adimit "+2/-1 (#5595 )")
|
|
37
|
+
|
|
38
|
+
# [1.11.0](https://github.com/axios/axios/compare/v1.10.0...v1.11.0) (2025-07-22)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
### Bug Fixes
|
|
42
|
+
|
|
43
|
+
* form-data npm pakcage ([#6970](https://github.com/axios/axios/issues/6970)) ([e72c193](https://github.com/axios/axios/commit/e72c193722530db538b19e5ddaaa4544d226b253))
|
|
44
|
+
* prevent RangeError when using large Buffers ([#6961](https://github.com/axios/axios/issues/6961)) ([a2214ca](https://github.com/axios/axios/commit/a2214ca1bc60540baf2c80573cea3a0ff91ba9d1))
|
|
45
|
+
* **types:** resolve type discrepancies between ESM and CJS TypeScript declaration files ([#6956](https://github.com/axios/axios/issues/6956)) ([8517aa1](https://github.com/axios/axios/commit/8517aa16f8d082fc1d5309c642220fa736159110))
|
|
46
|
+
|
|
47
|
+
### Contributors to this release
|
|
48
|
+
|
|
49
|
+
- <img src="https://avatars.githubusercontent.com/u/12534341?v=4&s=18" alt="avatar" width="18"/> [izzy goldman](https://github.com/izzygld "+186/-93 (#6970 )")
|
|
50
|
+
- <img src="https://avatars.githubusercontent.com/u/142807367?v=4&s=18" alt="avatar" width="18"/> [Manish Sahani](https://github.com/manishsahanidev "+70/-0 (#6961 )")
|
|
51
|
+
- <img src="https://avatars.githubusercontent.com/u/189505037?v=4&s=18" alt="avatar" width="18"/> [Noritaka Kobayashi](https://github.com/noritaka1166 "+12/-10 (#6938 #6939 )")
|
|
52
|
+
- <img src="https://avatars.githubusercontent.com/u/392612?v=4&s=18" alt="avatar" width="18"/> [James Nail](https://github.com/jrnail23 "+13/-2 (#6956 )")
|
|
53
|
+
- <img src="https://avatars.githubusercontent.com/u/163745239?v=4&s=18" alt="avatar" width="18"/> [Tejaswi1305](https://github.com/Tejaswi1305 "+1/-1 (#6894 )")
|
|
54
|
+
|
|
55
|
+
# [1.10.0](https://github.com/axios/axios/compare/v1.9.0...v1.10.0) (2025-06-14)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
### Bug Fixes
|
|
59
|
+
|
|
60
|
+
* **adapter:** pass fetchOptions to fetch function ([#6883](https://github.com/axios/axios/issues/6883)) ([0f50af8](https://github.com/axios/axios/commit/0f50af8e076b7fb403844789bd5e812dedcaf4ed))
|
|
61
|
+
* **form-data:** convert boolean values to strings in FormData serialization ([#6917](https://github.com/axios/axios/issues/6917)) ([5064b10](https://github.com/axios/axios/commit/5064b108de336ff34862650709761b8a96d26be0))
|
|
62
|
+
* **package:** add module entry point for React Native; ([#6933](https://github.com/axios/axios/issues/6933)) ([3d343b8](https://github.com/axios/axios/commit/3d343b86dc4fd0eea0987059c5af04327c7ae304))
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
### Features
|
|
66
|
+
|
|
67
|
+
* **types:** improved fetchOptions interface ([#6867](https://github.com/axios/axios/issues/6867)) ([63f1fce](https://github.com/axios/axios/commit/63f1fce233009f5db1abf2586c145825ac98c3d7))
|
|
68
|
+
|
|
69
|
+
### Contributors to this release
|
|
70
|
+
|
|
71
|
+
- <img src="https://avatars.githubusercontent.com/u/12586868?v=4&s=18" alt="avatar" width="18"/> [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+30/-19 (#6933 #6920 #6893 #6892 )")
|
|
72
|
+
- <img src="https://avatars.githubusercontent.com/u/189505037?v=4&s=18" alt="avatar" width="18"/> [Noritaka Kobayashi](https://github.com/noritaka1166 "+2/-6 (#6922 #6923 )")
|
|
73
|
+
- <img src="https://avatars.githubusercontent.com/u/48370490?v=4&s=18" alt="avatar" width="18"/> [Dimitrios Lazanas](https://github.com/dimitry-lzs "+4/-0 (#6917 )")
|
|
74
|
+
- <img src="https://avatars.githubusercontent.com/u/71047946?v=4&s=18" alt="avatar" width="18"/> [Adrian Knapp](https://github.com/AdrianKnapp "+2/-2 (#6867 )")
|
|
75
|
+
- <img src="https://avatars.githubusercontent.com/u/16129206?v=4&s=18" alt="avatar" width="18"/> [Howie Zhao](https://github.com/howiezhao "+3/-1 (#6872 )")
|
|
76
|
+
- <img src="https://avatars.githubusercontent.com/u/6788611?v=4&s=18" alt="avatar" width="18"/> [Uhyeon Park](https://github.com/warpdev "+1/-1 (#6883 )")
|
|
77
|
+
- <img src="https://avatars.githubusercontent.com/u/20028934?v=4&s=18" alt="avatar" width="18"/> [Sampo Silvennoinen](https://github.com/stscoundrel "+1/-1 (#6913 )")
|
|
78
|
+
|
|
79
|
+
# [1.9.0](https://github.com/axios/axios/compare/v1.8.4...v1.9.0) (2025-04-24)
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
### Bug Fixes
|
|
83
|
+
|
|
84
|
+
* **core:** fix the Axios constructor implementation to treat the config argument as optional; ([#6881](https://github.com/axios/axios/issues/6881)) ([6c5d4cd](https://github.com/axios/axios/commit/6c5d4cd69286868059c5e52d45085cb9a894a983))
|
|
85
|
+
* **fetch:** fixed ERR_NETWORK mapping for Safari browsers; ([#6767](https://github.com/axios/axios/issues/6767)) ([dfe8411](https://github.com/axios/axios/commit/dfe8411c9a082c3d068bdd1f8d6e73054f387f45))
|
|
86
|
+
* **headers:** allow iterable objects to be a data source for the set method; ([#6873](https://github.com/axios/axios/issues/6873)) ([1b1f9cc](https://github.com/axios/axios/commit/1b1f9ccdc15f1ea745160ec9a5223de9db4673bc))
|
|
87
|
+
* **headers:** fix `getSetCookie` by using 'get' method for caseless access; ([#6874](https://github.com/axios/axios/issues/6874)) ([d4f7df4](https://github.com/axios/axios/commit/d4f7df4b304af8b373488fdf8e830793ff843eb9))
|
|
88
|
+
* **headers:** fixed support for setting multiple header values from an iterated source; ([#6885](https://github.com/axios/axios/issues/6885)) ([f7a3b5e](https://github.com/axios/axios/commit/f7a3b5e0f7e5e127b97defa92a132fbf1b55cf15))
|
|
89
|
+
* **http:** send minimal end multipart boundary ([#6661](https://github.com/axios/axios/issues/6661)) ([987d2e2](https://github.com/axios/axios/commit/987d2e2dd3b362757550f36eab875e60640b6ddc))
|
|
90
|
+
* **types:** fix autocomplete for adapter config ([#6855](https://github.com/axios/axios/issues/6855)) ([e61a893](https://github.com/axios/axios/commit/e61a8934d8f94dd429a2f309b48c67307c700df0))
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
### Features
|
|
94
|
+
|
|
95
|
+
* **AxiosHeaders:** add getSetCookie method to retrieve set-cookie headers values ([#5707](https://github.com/axios/axios/issues/5707)) ([80ea756](https://github.com/axios/axios/commit/80ea756e72bcf53110fa792f5d7ab76e8b11c996))
|
|
96
|
+
|
|
97
|
+
### Contributors to this release
|
|
98
|
+
|
|
99
|
+
- <img src="https://avatars.githubusercontent.com/u/12586868?v=4&s=18" alt="avatar" width="18"/> [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+200/-34 (#6890 #6889 #6888 #6885 #6881 #6767 #6874 #6873 )")
|
|
100
|
+
- <img src="https://avatars.githubusercontent.com/u/4814473?v=4&s=18" alt="avatar" width="18"/> [Jay](https://github.com/jasonsaayman "+26/-1 ()")
|
|
101
|
+
- <img src="https://avatars.githubusercontent.com/u/22686401?v=4&s=18" alt="avatar" width="18"/> [Willian Agostini](https://github.com/WillianAgostini "+21/-0 (#5707 )")
|
|
102
|
+
- <img src="https://avatars.githubusercontent.com/u/2500247?v=4&s=18" alt="avatar" width="18"/> [George Cheng](https://github.com/Gerhut "+3/-3 (#5096 )")
|
|
103
|
+
- <img src="https://avatars.githubusercontent.com/u/30260221?v=4&s=18" alt="avatar" width="18"/> [FatahChan](https://github.com/FatahChan "+2/-2 (#6855 )")
|
|
104
|
+
- <img src="https://avatars.githubusercontent.com/u/49002?v=4&s=18" alt="avatar" width="18"/> [Ionuț G. Stan](https://github.com/igstan "+1/-1 (#6661 )")
|
|
105
|
+
|
|
106
|
+
## [1.8.4](https://github.com/axios/axios/compare/v1.8.3...v1.8.4) (2025-03-19)
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
### Bug Fixes
|
|
110
|
+
|
|
111
|
+
* **buildFullPath:** handle `allowAbsoluteUrls: false` without `baseURL` ([#6833](https://github.com/axios/axios/issues/6833)) ([f10c2e0](https://github.com/axios/axios/commit/f10c2e0de7fde0051f848609a29c2906d0caa1d9))
|
|
112
|
+
|
|
113
|
+
### Contributors to this release
|
|
114
|
+
|
|
115
|
+
- <img src="https://avatars.githubusercontent.com/u/8029107?v=4&s=18" alt="avatar" width="18"/> [Marc Hassan](https://github.com/mhassan1 "+5/-1 (#6833 )")
|
|
116
|
+
|
|
117
|
+
## [1.8.3](https://github.com/axios/axios/compare/v1.8.2...v1.8.3) (2025-03-10)
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
### Bug Fixes
|
|
121
|
+
|
|
122
|
+
* add missing type for allowAbsoluteUrls ([#6818](https://github.com/axios/axios/issues/6818)) ([10fa70e](https://github.com/axios/axios/commit/10fa70ef14fe39558b15a179f0e82f5f5e5d11b2))
|
|
123
|
+
* **xhr/fetch:** pass `allowAbsoluteUrls` to `buildFullPath` in `xhr` and `fetch` adapters ([#6814](https://github.com/axios/axios/issues/6814)) ([ec159e5](https://github.com/axios/axios/commit/ec159e507bdf08c04ba1a10fe7710094e9e50ec9))
|
|
124
|
+
|
|
125
|
+
### Contributors to this release
|
|
126
|
+
|
|
127
|
+
- <img src="https://avatars.githubusercontent.com/u/3238291?v=4&s=18" alt="avatar" width="18"/> [Ashcon Partovi](https://github.com/Electroid "+6/-0 (#6811 )")
|
|
128
|
+
- <img src="https://avatars.githubusercontent.com/u/28559054?v=4&s=18" alt="avatar" width="18"/> [StefanBRas](https://github.com/StefanBRas "+4/-0 (#6818 )")
|
|
129
|
+
- <img src="https://avatars.githubusercontent.com/u/8029107?v=4&s=18" alt="avatar" width="18"/> [Marc Hassan](https://github.com/mhassan1 "+2/-2 (#6814 )")
|
|
130
|
+
|
|
131
|
+
## [1.8.2](https://github.com/axios/axios/compare/v1.8.1...v1.8.2) (2025-03-07)
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
### Bug Fixes
|
|
135
|
+
|
|
136
|
+
* **http-adapter:** add allowAbsoluteUrls to path building ([#6810](https://github.com/axios/axios/issues/6810)) ([fb8eec2](https://github.com/axios/axios/commit/fb8eec214ce7744b5ca787f2c3b8339b2f54b00f))
|
|
137
|
+
|
|
138
|
+
### Contributors to this release
|
|
139
|
+
|
|
140
|
+
- <img src="https://avatars.githubusercontent.com/u/14166260?v=4&s=18" alt="avatar" width="18"/> [Fasoro-Joseph Alexander](https://github.com/lexcorp16 "+1/-1 (#6810 )")
|
|
141
|
+
|
|
142
|
+
## [1.8.1](https://github.com/axios/axios/compare/v1.8.0...v1.8.1) (2025-02-26)
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
### Bug Fixes
|
|
146
|
+
|
|
147
|
+
* **utils:** move `generateString` to platform utils to avoid importing crypto module into client builds; ([#6789](https://github.com/axios/axios/issues/6789)) ([36a5a62](https://github.com/axios/axios/commit/36a5a620bec0b181451927f13ac85b9888b86cec))
|
|
148
|
+
|
|
149
|
+
### Contributors to this release
|
|
150
|
+
|
|
151
|
+
- <img src="https://avatars.githubusercontent.com/u/12586868?v=4&s=18" alt="avatar" width="18"/> [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+51/-47 (#6789 )")
|
|
152
|
+
|
|
153
|
+
# [1.8.0](https://github.com/axios/axios/compare/v1.7.9...v1.8.0) (2025-02-25)
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
### Bug Fixes
|
|
157
|
+
|
|
158
|
+
* **examples:** application crashed when navigating examples in browser ([#5938](https://github.com/axios/axios/issues/5938)) ([1260ded](https://github.com/axios/axios/commit/1260ded634ec101dd5ed05d3b70f8e8f899dba6c))
|
|
159
|
+
* missing word in SUPPORT_QUESTION.yml ([#6757](https://github.com/axios/axios/issues/6757)) ([1f890b1](https://github.com/axios/axios/commit/1f890b13f2c25a016f3c84ae78efb769f244133e))
|
|
160
|
+
* **utils:** replace getRandomValues with crypto module ([#6788](https://github.com/axios/axios/issues/6788)) ([23a25af](https://github.com/axios/axios/commit/23a25af0688d1db2c396deb09229d2271cc24f6c))
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
### Features
|
|
164
|
+
|
|
165
|
+
* Add config for ignoring absolute URLs ([#5902](https://github.com/axios/axios/issues/5902)) ([#6192](https://github.com/axios/axios/issues/6192)) ([32c7bcc](https://github.com/axios/axios/commit/32c7bcc0f233285ba27dec73a4b1e81fb7a219b3))
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
### Reverts
|
|
169
|
+
|
|
170
|
+
* Revert "chore: expose fromDataToStream to be consumable (#6731)" (#6732) ([1317261](https://github.com/axios/axios/commit/1317261125e9c419fe9f126867f64d28f9c1efda)), closes [#6731](https://github.com/axios/axios/issues/6731) [#6732](https://github.com/axios/axios/issues/6732)
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
### BREAKING CHANGES
|
|
174
|
+
|
|
175
|
+
* code relying on the above will now combine the URLs instead of prefer request URL
|
|
176
|
+
|
|
177
|
+
* feat: add config option for allowing absolute URLs
|
|
178
|
+
|
|
179
|
+
* fix: add default value for allowAbsoluteUrls in buildFullPath
|
|
180
|
+
|
|
181
|
+
* fix: typo in flow control when setting allowAbsoluteUrls
|
|
182
|
+
|
|
183
|
+
### Contributors to this release
|
|
184
|
+
|
|
185
|
+
- <img src="https://avatars.githubusercontent.com/u/7661715?v=4&s=18" alt="avatar" width="18"/> [Michael Toscano](https://github.com/GethosTheWalrus "+42/-8 (#6192 )")
|
|
186
|
+
- <img src="https://avatars.githubusercontent.com/u/22686401?v=4&s=18" alt="avatar" width="18"/> [Willian Agostini](https://github.com/WillianAgostini "+26/-3 (#6788 #6777 )")
|
|
187
|
+
- <img src="https://avatars.githubusercontent.com/u/72578270?v=4&s=18" alt="avatar" width="18"/> [Naron](https://github.com/naronchen "+27/-0 (#5901 )")
|
|
188
|
+
- <img src="https://avatars.githubusercontent.com/u/47430686?v=4&s=18" alt="avatar" width="18"/> [shravan || श्रvan](https://github.com/shravan20 "+7/-3 (#6116 )")
|
|
189
|
+
- <img src="https://avatars.githubusercontent.com/u/145078271?v=4&s=18" alt="avatar" width="18"/> [Justin Dhillon](https://github.com/justindhillon "+0/-7 (#6312 )")
|
|
190
|
+
- <img src="https://avatars.githubusercontent.com/u/30925732?v=4&s=18" alt="avatar" width="18"/> [yionr](https://github.com/yionr "+5/-1 (#6129 )")
|
|
191
|
+
- <img src="https://avatars.githubusercontent.com/u/534166?v=4&s=18" alt="avatar" width="18"/> [Shin'ya Ueoka](https://github.com/ueokande "+3/-3 (#5935 )")
|
|
192
|
+
- <img src="https://avatars.githubusercontent.com/u/33569?v=4&s=18" alt="avatar" width="18"/> [Dan Dascalescu](https://github.com/dandv "+3/-3 (#5908 #6757 )")
|
|
193
|
+
- <img src="https://avatars.githubusercontent.com/u/16476523?v=4&s=18" alt="avatar" width="18"/> [Nitin Ramnani](https://github.com/NitinRamnani "+2/-2 (#5938 )")
|
|
194
|
+
- <img src="https://avatars.githubusercontent.com/u/152275799?v=4&s=18" alt="avatar" width="18"/> [Shay Molcho](https://github.com/shaymolcho "+2/-2 (#6770 )")
|
|
195
|
+
- <img src="https://avatars.githubusercontent.com/u/4814473?v=4&s=18" alt="avatar" width="18"/> [Jay](https://github.com/jasonsaayman "+0/-3 (#6732 )")
|
|
196
|
+
- fancy45daddy
|
|
197
|
+
- <img src="https://avatars.githubusercontent.com/u/127725897?v=4&s=18" alt="avatar" width="18"/> [Habip Akyol](https://github.com/habipakyol "+1/-1 (#6030 )")
|
|
198
|
+
- <img src="https://avatars.githubusercontent.com/u/54869395?v=4&s=18" alt="avatar" width="18"/> [Bailey Lissington](https://github.com/llamington "+1/-1 (#6771 )")
|
|
199
|
+
- <img src="https://avatars.githubusercontent.com/u/14969290?v=4&s=18" alt="avatar" width="18"/> [Bernardo da Eira Duarte](https://github.com/bernardoduarte "+1/-1 (#6480 )")
|
|
200
|
+
- <img src="https://avatars.githubusercontent.com/u/117800149?v=4&s=18" alt="avatar" width="18"/> [Shivam Batham](https://github.com/Shivam-Batham "+1/-1 (#5949 )")
|
|
201
|
+
- <img src="https://avatars.githubusercontent.com/u/67861627?v=4&s=18" alt="avatar" width="18"/> [Lipin Kariappa](https://github.com/lipinnnnn "+1/-1 (#5936 )")
|
|
202
|
+
|
|
3
203
|
## [1.7.9](https://github.com/axios/axios/compare/v1.7.8...v1.7.9) (2024-12-04)
|
|
4
204
|
|
|
5
205
|
|
package/README.md
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
|
|
2
|
-
<h3 align="center"> 🥇 Gold sponsors <br> </h3> <table align="center" width="100%"><tr width="33.333333333333336%"><td align="center" width="33.333333333333336%"> <a href="https://
|
|
3
|
-
</td><td align="center" width="33.333333333333336%"> <a href="https://
|
|
4
|
-
</td><td align="center" width="33.333333333333336%"> <a href="https://www.
|
|
5
|
-
</td></tr><tr width="33.333333333333336%"><td align="center" width="33.333333333333336%"> <a href="https://
|
|
6
|
-
</td><td align="center" width="33.333333333333336%"> <a href="https://www.
|
|
7
|
-
</td><td align="center" width="33.333333333333336%"> <a href="https://
|
|
8
|
-
</td></tr><tr width="33.333333333333336%"><td align="center" width="33.333333333333336%"> <a href="https://
|
|
9
|
-
</td><td align="center" width="33.333333333333336%"> <a href="https://
|
|
10
|
-
</td><td align="center" width="33.333333333333336%"> <a href="https://
|
|
2
|
+
<h3 align="center"> 🥇 Gold sponsors <br> </h3> <table align="center" width="100%"><tr width="33.333333333333336%"><td align="center" width="33.333333333333336%"> <a href="https://dev.intra-mart.jp/?utm_source=axios&utm_medium=sponsorlist&utm_campaign=sponsorship" style="padding: 10px; display: inline-block" target="_blank"> <img width="48px" height="47px" src="https://axios-http.com/assets/sponsors/opencollective/948009b39c308b39f58c5d1245abd22512adc37b.png" alt="intra-mart"/> </a> <p align="center" title="[1ページ目] CookBook の記事 intra-mart Developer Portal ">[1ページ目] CookBook の記事 intra-mart Developer Portal</p> <p align="center"> <a href="https://dev.intra-mart.jp/?utm_source=axios&utm_medium=readme_sponsorlist&utm_campaign=sponsorship" target="_blank"><b>dev.intra-mart.jp</b></a> </p>
|
|
3
|
+
</td><td align="center" width="33.333333333333336%"> <a href="https://stytch.com/?utm_source=oss-sponsorship&utm_medium=paid_sponsorship&utm_content=website-link&utm_campaign=axios-http" style="padding: 10px; display: inline-block" target="_blank"> <picture> <source width="200px" height="38px" media="(prefers-color-scheme: dark)" srcset="https://axios-http.com/assets/sponsors/stytch_white.png"> <img width="200px" height="38px" src="https://axios-http.com/assets/sponsors/stytch.png" alt="Stytch"/> </picture> </a> <p align="center" title="API-first authentication, authorization, and fraud prevention">API-first authentication, authorization, and fraud prevention</p> <p align="center"> <a href="https://stytch.com/?utm_source=oss-sponsorship&utm_medium=paid_sponsorship&utm_content=website-link&utm_campaign=axios-http" target="_blank"><b>Website</b></a> | <a href="https://stytch.com/docs?utm_source=oss-sponsorship&utm_medium=paid_sponsorship&utm_content=docs-link&utm_campaign=axios-http" target="_blank"><b>Documentation</b></a> | <a href="https://github.com/stytchauth/stytch-node?utm_source=oss-sponsorship&utm_medium=paid_sponsorship&utm_content=node-sdk&utm_campaign=axios-http" target="_blank"><b>Node.js</b></a> </p>
|
|
4
|
+
</td><td align="center" width="33.333333333333336%"> <a href="https://www.principal.com/about-us?utm_source=axios&utm_medium=sponsorlist&utm_campaign=sponsorship" style="padding: 10px; display: inline-block" target="_blank"> <img width="133px" height="43px" src="https://axios-http.com/assets/sponsors/principal.svg" alt="Principal Financial Group"/> </a> <p align="center" title="We’re bound by one common purpose: to give you the financial tools, resources and information you need to live your best life.">We’re bound by one common purpose: to give you the financial tools, resources and information you ne...</p> <p align="center"> <a href="https://www.principal.com/about-us?utm_source=axios&utm_medium=readme_sponsorlist&utm_campaign=sponsorship" target="_blank"><b>www.principal.com</b></a> </p>
|
|
5
|
+
</td></tr><tr width="33.333333333333336%"><td align="center" width="33.333333333333336%"> <a href="https://twicsy.com/buy-instagram-followers?utm_source=axios&utm_medium=sponsorlist&utm_campaign=sponsorship" style="padding: 10px; display: inline-block" target="_blank"> <img width="85px" height="70px" src="https://axios-http.com/assets/sponsors/opencollective/dfa9670ad5e66eea17315332453c7f4e3a3b5905.png" alt="Buy Instagram Followers Twicsy"/> </a> <p align="center" title="Buy real Instagram followers from Twicsy starting at only $2.97. Twicsy has been voted the best site to buy followers from the likes of US Magazine.">Buy real Instagram followers from Twicsy starting at only $2.97. Twicsy has been voted the best site...</p> <p align="center"> <a href="https://twicsy.com/buy-instagram-followers?utm_source=axios&utm_medium=readme_sponsorlist&utm_campaign=sponsorship" target="_blank"><b>twicsy.com</b></a> </p>
|
|
6
|
+
</td><td align="center" width="33.333333333333336%"> <a href="https://www.descope.com/?utm_source=axios&utm_medium=referral&utm_campaign=axios-oss-sponsorship" style="padding: 10px; display: inline-block" target="_blank"> <picture> <source width="200px" height="52px" media="(prefers-color-scheme: dark)" srcset="https://axios-http.com/assets/sponsors/descope_white.png"> <img width="200px" height="52px" src="https://axios-http.com/assets/sponsors/descope.png" alt="Descope"/> </picture> </a> <p align="center" title="Hi, we're Descope! We are building something in the authentication space for app developers and can’t wait to place it in your hands.">Hi, we're Descope! We are building something in the authentication space for app developers and...</p> <p align="center"> <a href="https://www.descope.com/?utm_source=axios&utm_medium=referral&utm_campaign=axios-oss-sponsorship" target="_blank"><b>Website</b></a> | <a href="https://docs.descope.com/?utm_source=axios&utm_medium=referral&utm_campaign=axios-oss-sponsorship" target="_blank"><b>Docs</b></a> | <a href="https://www.descope.com/community?utm_source=axios&utm_medium=referral&utm_campaign=axios-oss-sponsorship" target="_blank"><b>Community</b></a> </p>
|
|
7
|
+
</td><td align="center" width="33.333333333333336%"> <a href="https://route4me.com/?utm_source=axios&utm_medium=sponsorlist&utm_campaign=sponsorship" style="padding: 10px; display: inline-block" target="_blank"> <picture> <source width="200px" height="51px" media="(prefers-color-scheme: dark)" srcset="https://axios-http.com/assets/sponsors/route4me_white.png"> <img width="200px" height="51px" src="https://axios-http.com/assets/sponsors/route4me.png" alt="Route4Me"/> </picture> </a> <p align="center" title="Best Route Planning And Route Optimization Software">Best Route Planning And Route Optimization Software</p> <p align="center"> <a href="https://route4me.com/platform/route-optimization-software?utm_source=axios&utm_medium=readme_sponsorlist&utm_campaign=sponsorship" target="_blank"><b>Explore</b></a> | <a href="https://route4me.com/platform/marketplace/pricing?utm_source=axios&utm_medium=readme_sponsorlist&utm_campaign=sponsorship" target="_blank"><b>Free Trial</b></a> | <a href="https://route4me.com/contact?utm_source=axios&utm_medium=readme_sponsorlist&utm_campaign=sponsorship" target="_blank"><b>Contact</b></a> </p>
|
|
8
|
+
</td></tr><tr width="33.333333333333336%"><td align="center" width="33.333333333333336%"> <a href="https://buzzoid.com/buy-instagram-followers/?utm_source=axios&utm_medium=sponsorlist&utm_campaign=sponsorship" style="padding: 10px; display: inline-block" target="_blank"> <img width="62px" height="70px" src="https://axios-http.com/assets/sponsors/opencollective/e1625cb54e10ee40180c99d1495a462e9d6664a4.png" alt="Buzzoid - Buy Instagram Followers"/> </a> <p align="center" title="At Buzzoid, you can buy Instagram followers quickly, safely, and easily with just a few clicks. Rated world's #1 IG service since 2012.">At Buzzoid, you can buy Instagram followers quickly, safely, and easily with just a few clicks. Rate...</p> <p align="center"> <a href="https://buzzoid.com/buy-instagram-followers/?utm_source=axios&utm_medium=readme_sponsorlist&utm_campaign=sponsorship" target="_blank"><b>buzzoid.com</b></a> </p>
|
|
9
|
+
</td><td align="center" width="33.333333333333336%"> <a href="https://www.famety.net/?utm_source=axios&utm_medium=sponsorlist&utm_campaign=sponsorship" style="padding: 10px; display: inline-block" target="_blank"> <img width="70px" height="70px" src="https://axios-http.com/assets/sponsors/opencollective/56645c65d4bad0ab84265e02430d19d64afde927.png" alt="Famety - Buy Instagram Followers"/> </a> <p align="center" title="At Famety, you can grow your social media following quickly, safely, and easily with just a few clicks. Rated the world’s #1 social media service since 2013.">At Famety, you can grow your social media following quickly, safely, and easily with just a few clic...</p> <p align="center"> <a href="https://www.famety.net/?utm_source=axios&utm_medium=readme_sponsorlist&utm_campaign=sponsorship" target="_blank"><b>www.famety.net</b></a> </p>
|
|
10
|
+
</td><td align="center" width="33.333333333333336%"> <a href="https://poprey.com/?utm_source=axios&utm_medium=sponsorlist&utm_campaign=sponsorship" style="padding: 10px; display: inline-block" target="_blank"> <img width="70px" height="70px" src="https://axios-http.com/assets/sponsors/opencollective/e699ec99f7df3a203ddbc49d3c7712a907e628ea.png" alt="Poprey - Buy Instagram Likes"/> </a> <p align="center" title="Buy Instagram Likes">Buy Instagram Likes</p> <p align="center"> <a href="https://poprey.com/?utm_source=axios&utm_medium=readme_sponsorlist&utm_campaign=sponsorship" target="_blank"><b>poprey.com</b></a> </p>
|
|
11
|
+
</td></tr><tr width="33.333333333333336%"><td align="center" width="33.333333333333336%"> <a href="https://ssmarket.net/buy-youtube-subscribers?utm_source=axios&utm_medium=sponsorlist&utm_campaign=sponsorship" style="padding: 10px; display: inline-block" target="_blank"> <img width="70px" height="70px" src="https://axios-http.com/assets/sponsors/opencollective/0845614102b0c6602707ca2983de05a0098faad4.png" alt="Buy Youtube Subscribers"/> </a> <p align="center" title="SS Market offers professional social media services that rapidly increase your YouTube subscriber count, elevating your channel to a powerful position.">SS Market offers professional social media services that rapidly increase your YouTube subscriber co...</p> <p align="center"> <a href="https://ssmarket.net/buy-youtube-subscribers?utm_source=axios&utm_medium=readme_sponsorlist&utm_campaign=sponsorship" target="_blank"><b>ssmarket.net</b></a> </p>
|
|
12
|
+
</td><td align="center" width="33.333333333333336%"> <a href="https://opencollective.com/axios/contribute" target="_blank" >💜 Become a sponsor</a>
|
|
13
|
+
</td><td align="center" width="33.333333333333336%"> <a href="https://opencollective.com/axios/contribute" target="_blank" >💜 Become a sponsor</a>
|
|
11
14
|
</td></tr></table>
|
|
12
15
|
|
|
13
16
|
<!--<div>marker</div>-->
|
|
@@ -135,6 +138,12 @@ Using pnpm:
|
|
|
135
138
|
$ pnpm add axios
|
|
136
139
|
```
|
|
137
140
|
|
|
141
|
+
Using bun:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
$ bun add axios
|
|
145
|
+
```
|
|
146
|
+
|
|
138
147
|
Once the package is installed, you can import the library using `import` or `require` approach:
|
|
139
148
|
|
|
140
149
|
```js
|
|
@@ -157,7 +166,7 @@ const axios = require('axios');
|
|
|
157
166
|
console.log(axios.isCancel('something'));
|
|
158
167
|
```
|
|
159
168
|
|
|
160
|
-
For some bundlers and some ES6
|
|
169
|
+
For some bundlers and some ES6 linters you may need to do the following:
|
|
161
170
|
|
|
162
171
|
```js
|
|
163
172
|
import { default as axios } from 'axios';
|
|
@@ -372,11 +381,16 @@ These are the available config options for making requests. Only the `url` is re
|
|
|
372
381
|
// `method` is the request method to be used when making the request
|
|
373
382
|
method: 'get', // default
|
|
374
383
|
|
|
375
|
-
// `baseURL` will be prepended to `url` unless `url` is absolute.
|
|
384
|
+
// `baseURL` will be prepended to `url` unless `url` is absolute and option `allowAbsoluteUrls` is set to true.
|
|
376
385
|
// It can be convenient to set `baseURL` for an instance of axios to pass relative URLs
|
|
377
386
|
// to methods of that instance.
|
|
378
387
|
baseURL: 'https://some-domain.com/api/',
|
|
379
388
|
|
|
389
|
+
// `allowAbsoluteUrls` determines whether or not absolute URLs will override a configured `baseUrl`.
|
|
390
|
+
// When set to true (default), absolute values for `url` will override `baseUrl`.
|
|
391
|
+
// When set to false, absolute values for `url` will always be prepended by `baseUrl`.
|
|
392
|
+
allowAbsoluteUrls: true,
|
|
393
|
+
|
|
380
394
|
// `transformRequest` allows changes to the request data before it is sent to the server
|
|
381
395
|
// This is only applicable for request methods 'PUT', 'POST', 'PATCH' and 'DELETE'
|
|
382
396
|
// The last function in the array must return a string or an instance of Buffer, ArrayBuffer,
|
|
@@ -408,13 +422,13 @@ These are the available config options for making requests. Only the `url` is re
|
|
|
408
422
|
// `paramsSerializer` is an optional config that allows you to customize serializing `params`.
|
|
409
423
|
paramsSerializer: {
|
|
410
424
|
|
|
411
|
-
//Custom encoder function which sends key/value pairs in an iterative fashion.
|
|
425
|
+
// Custom encoder function which sends key/value pairs in an iterative fashion.
|
|
412
426
|
encode?: (param: string): string => { /* Do custom operations here and return transformed string */ },
|
|
413
427
|
|
|
414
428
|
// Custom serializer function for the entire parameter. Allows user to mimic pre 1.x behaviour.
|
|
415
429
|
serialize?: (params: Record<string, any>, options?: ParamsSerializerOptions ),
|
|
416
430
|
|
|
417
|
-
//Configuration for formatting array indexes in the params.
|
|
431
|
+
// Configuration for formatting array indexes in the params.
|
|
418
432
|
indexes: false // Three available options: (1) indexes: null (leads to no brackets), (2) (default) indexes: false (leads to empty brackets), (3) indexes: true (leads to brackets with indexes).
|
|
419
433
|
},
|
|
420
434
|
|
|
@@ -448,7 +462,7 @@ These are the available config options for making requests. Only the `url` is re
|
|
|
448
462
|
},
|
|
449
463
|
// Also, you can set the name of the built-in adapter, or provide an array with their names
|
|
450
464
|
// to choose the first available in the environment
|
|
451
|
-
adapter: 'xhr' // 'fetch' | 'http' | ['xhr', 'http', 'fetch']
|
|
465
|
+
adapter: 'xhr', // 'fetch' | 'http' | ['xhr', 'http', 'fetch']
|
|
452
466
|
|
|
453
467
|
// `auth` indicates that HTTP Basic auth should be used, and supplies credentials.
|
|
454
468
|
// This will set an `Authorization` header, overwriting any existing
|
|
@@ -528,12 +542,18 @@ These are the available config options for making requests. Only the `url` is re
|
|
|
528
542
|
// If both are specified, `socketPath` is used.
|
|
529
543
|
socketPath: null, // default
|
|
530
544
|
|
|
531
|
-
// `transport` determines the transport method that will be used to make the request.
|
|
545
|
+
// `transport` determines the transport method that will be used to make the request.
|
|
546
|
+
// If defined, it will be used. Otherwise, if `maxRedirects` is 0,
|
|
547
|
+
// the default `http` or `https` library will be used, depending on the protocol specified in `protocol`.
|
|
548
|
+
// Otherwise, the `httpFollow` or `httpsFollow` library will be used, again depending on the protocol,
|
|
549
|
+
// which can handle redirects.
|
|
532
550
|
transport: undefined, // default
|
|
533
551
|
|
|
534
552
|
// `httpAgent` and `httpsAgent` define a custom agent to be used when performing http
|
|
535
553
|
// and https requests, respectively, in node.js. This allows options to be added like
|
|
536
|
-
// `keepAlive` that are not enabled by default.
|
|
554
|
+
// `keepAlive` that are not enabled by default before Node.js v19.0.0. After Node.js
|
|
555
|
+
// v19.0.0, you no longer need to customize the agent to enable `keepAlive` because
|
|
556
|
+
// `http.globalAgent` has `keepAlive` enabled by default.
|
|
537
557
|
httpAgent: new http.Agent({ keepAlive: true }),
|
|
538
558
|
httpsAgent: new https.Agent({ keepAlive: true }),
|
|
539
559
|
|
|
@@ -690,7 +710,7 @@ instance.defaults.headers.common['Authorization'] = AUTH_TOKEN;
|
|
|
690
710
|
|
|
691
711
|
### Config order of precedence
|
|
692
712
|
|
|
693
|
-
Config will be merged with an order of precedence. The order is library defaults found in [lib/defaults.js](https://github.com/axios/axios/blob/
|
|
713
|
+
Config will be merged with an order of precedence. The order is library defaults found in [lib/defaults/index.js](https://github.com/axios/axios/blob/main/lib/defaults/index.js#L49), then `defaults` property of the instance, and finally `config` argument for the request. The latter will take precedence over the former. Here's an example.
|
|
694
714
|
|
|
695
715
|
```js
|
|
696
716
|
// Create an instance using the config defaults provided by the library
|
|
@@ -712,8 +732,11 @@ instance.get('/longRequest', {
|
|
|
712
732
|
You can intercept requests or responses before they are handled by `then` or `catch`.
|
|
713
733
|
|
|
714
734
|
```js
|
|
735
|
+
|
|
736
|
+
const instance = axios.create();
|
|
737
|
+
|
|
715
738
|
// Add a request interceptor
|
|
716
|
-
|
|
739
|
+
instance.interceptors.request.use(function (config) {
|
|
717
740
|
// Do something before request is sent
|
|
718
741
|
return config;
|
|
719
742
|
}, function (error) {
|
|
@@ -722,7 +745,7 @@ axios.interceptors.request.use(function (config) {
|
|
|
722
745
|
});
|
|
723
746
|
|
|
724
747
|
// Add a response interceptor
|
|
725
|
-
|
|
748
|
+
instance.interceptors.response.use(function (response) {
|
|
726
749
|
// Any status code that lie within the range of 2xx cause this function to trigger
|
|
727
750
|
// Do something with response data
|
|
728
751
|
return response;
|
|
@@ -736,7 +759,8 @@ axios.interceptors.response.use(function (response) {
|
|
|
736
759
|
If you need to remove an interceptor later you can.
|
|
737
760
|
|
|
738
761
|
```js
|
|
739
|
-
const
|
|
762
|
+
const instance = axios.create();
|
|
763
|
+
const myInterceptor = instance.interceptors.request.use(function () {/*...*/});
|
|
740
764
|
axios.interceptors.request.eject(myInterceptor);
|
|
741
765
|
```
|
|
742
766
|
|
|
@@ -815,21 +839,22 @@ The general structure of axios errors is as follows:
|
|
|
815
839
|
| code | Represents an axios identified error. The table below lists out specific definitions for internal axios error. |
|
|
816
840
|
| status | HTTP response status code. See [here](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) for common HTTP response status code meanings.
|
|
817
841
|
|
|
818
|
-
Below is a list of potential axios identified error
|
|
819
|
-
|
|
820
|
-
|
|
|
821
|
-
|
|
|
822
|
-
|
|
|
823
|
-
|
|
|
824
|
-
|
|
|
825
|
-
|
|
|
826
|
-
|
|
|
827
|
-
|
|
|
828
|
-
|
|
|
829
|
-
|
|
|
830
|
-
|
|
|
831
|
-
|
|
|
832
|
-
|
|
|
842
|
+
Below is a list of potential axios identified error:
|
|
843
|
+
|
|
844
|
+
| Code | Definition |
|
|
845
|
+
| --- | --- |
|
|
846
|
+
| ERR_BAD_OPTION_VALUE | Invalid value provided in axios configuration. |
|
|
847
|
+
| ERR_BAD_OPTION | Invalid option provided in axios configuration. |
|
|
848
|
+
| ERR_NOT_SUPPORT | Feature or method not supported in the current axios environment. |
|
|
849
|
+
| ERR_DEPRECATED | Deprecated feature or method used in axios. |
|
|
850
|
+
| ERR_INVALID_URL | Invalid URL provided for axios request. |
|
|
851
|
+
| ECONNABORTED | Typically indicates that the request has been timed out (unless `transitional.clarifyTimeoutError` is set) or aborted by the browser or its plugin. |
|
|
852
|
+
| ERR_CANCELED | Feature or method is canceled explicitly by the user using an AbortSignal (or a CancelToken). |
|
|
853
|
+
| ETIMEDOUT | Request timed out due to exceeding default axios timelimit. `transitional.clarifyTimeoutError` must be set to `true`, otherwise a generic `ECONNABORTED` error will be thrown instead. |
|
|
854
|
+
| ERR_NETWORK | Network-related issue. In the browser, this error can also be caused by a [CORS](https://developer.mozilla.org/ru/docs/Web/HTTP/Guides/CORS) or [Mixed Content](https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content) policy violation. The browser does not allow the JS code to clarify the real reason for the error caused by security issues, so please check the console. |
|
|
855
|
+
| ERR_FR_TOO_MANY_REDIRECTS | Request is redirected too many times; exceeds max redirects specified in axios configuration. |
|
|
856
|
+
| ERR_BAD_RESPONSE | Response cannot be parsed properly or is in an unexpected format. Usually related to a response with `5xx` status code. |
|
|
857
|
+
| ERR_BAD_REQUEST | The request has an unexpected format or is missing required parameters. Usually related to a response with `4xx` status code. |
|
|
833
858
|
|
|
834
859
|
## Handling Errors
|
|
835
860
|
|
|
@@ -1126,7 +1151,7 @@ to a `FormData` object by following custom rules.
|
|
|
1126
1151
|
- `metaTokens: boolean = true` - add the special ending (e.g `user{}: '{"name": "John"}'`) in the FormData key.
|
|
1127
1152
|
The back-end body-parser could potentially use this meta-information to automatically parse the value as JSON.
|
|
1128
1153
|
|
|
1129
|
-
- `indexes: null|false|true = false` - controls how indexes will be added to unwrapped keys of `flat` array-like objects
|
|
1154
|
+
- `indexes: null|false|true = false` - controls how indexes will be added to unwrapped keys of `flat` array-like objects.
|
|
1130
1155
|
|
|
1131
1156
|
- `null` - don't add brackets (`arr: 1`, `arr: 2`, `arr: 3`)
|
|
1132
1157
|
- `false`(default) - add empty brackets (`arr[]: 1`, `arr[]: 2`, `arr[]: 3`)
|
|
@@ -1603,7 +1628,7 @@ Also, it supports additional response types such as `stream` and `formdata` (if
|
|
|
1603
1628
|
|
|
1604
1629
|
## Semver
|
|
1605
1630
|
|
|
1606
|
-
|
|
1631
|
+
Since Axios has reached a `v.1.0.0` we will fully embrace semver as per the spec [here](https://semver.org/)
|
|
1607
1632
|
|
|
1608
1633
|
## Promises
|
|
1609
1634
|
|