axios 1.8.4 → 1.9.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 +27 -0
- package/README.md +5 -5
- package/dist/axios.js +32 -16
- package/dist/axios.js.map +1 -1
- package/dist/axios.min.js +2 -2
- package/dist/axios.min.js.map +1 -1
- package/dist/browser/axios.cjs +31 -13
- package/dist/browser/axios.cjs.map +1 -1
- package/dist/esm/axios.js +31 -13
- package/dist/esm/axios.js.map +1 -1
- package/dist/esm/axios.min.js +2 -2
- package/dist/esm/axios.min.js.map +1 -1
- package/dist/node/axios.cjs +32 -14
- package/dist/node/axios.cjs.map +1 -1
- package/index.d.cts +2 -2
- package/index.d.ts +4 -2
- package/lib/adapters/fetch.js +1 -1
- package/lib/core/Axios.js +1 -1
- package/lib/core/AxiosHeaders.js +15 -3
- package/lib/env/data.js +1 -1
- package/lib/helpers/formDataToStream.js +1 -1
- package/lib/utils.js +12 -6
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,32 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
# [1.9.0](https://github.com/axios/axios/compare/v1.8.4...v1.9.0) (2025-04-24)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* **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))
|
9
|
+
* **fetch:** fixed ERR_NETWORK mapping for Safari browsers; ([#6767](https://github.com/axios/axios/issues/6767)) ([dfe8411](https://github.com/axios/axios/commit/dfe8411c9a082c3d068bdd1f8d6e73054f387f45))
|
10
|
+
* **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))
|
11
|
+
* **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))
|
12
|
+
* **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))
|
13
|
+
* **http:** send minimal end multipart boundary ([#6661](https://github.com/axios/axios/issues/6661)) ([987d2e2](https://github.com/axios/axios/commit/987d2e2dd3b362757550f36eab875e60640b6ddc))
|
14
|
+
* **types:** fix autocomplete for adapter config ([#6855](https://github.com/axios/axios/issues/6855)) ([e61a893](https://github.com/axios/axios/commit/e61a8934d8f94dd429a2f309b48c67307c700df0))
|
15
|
+
|
16
|
+
|
17
|
+
### Features
|
18
|
+
|
19
|
+
* **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))
|
20
|
+
|
21
|
+
### Contributors to this release
|
22
|
+
|
23
|
+
- <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 )")
|
24
|
+
- <img src="https://avatars.githubusercontent.com/u/4814473?v=4&s=18" alt="avatar" width="18"/> [Jay](https://github.com/jasonsaayman "+26/-1 ()")
|
25
|
+
- <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 )")
|
26
|
+
- <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 )")
|
27
|
+
- <img src="https://avatars.githubusercontent.com/u/30260221?v=4&s=18" alt="avatar" width="18"/> [FatahChan](https://github.com/FatahChan "+2/-2 (#6855 )")
|
28
|
+
- <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 )")
|
29
|
+
|
3
30
|
## [1.8.4](https://github.com/axios/axios/compare/v1.8.3...v1.8.4) (2025-03-19)
|
4
31
|
|
5
32
|
|
package/README.md
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
|
2
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://stytch.com/?utm_source=oss-sponsorship&utm_medium=paid_sponsorship&utm_content=website-link&utm_campaign=axios-http" style="padding: 10px; display: inline-block"> <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"><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"><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"><b>Node.js</b></a> </p>
|
3
3
|
</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"> <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"><b>www.principal.com</b></a> </p>
|
4
|
-
</td><td align="center" width="33.333333333333336%"> <a href="https://
|
5
|
-
</td></tr><tr width="33.333333333333336%"><td align="center" width="33.333333333333336%"> <a href="https://
|
4
|
+
</td><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"> <img width="85px" height="70px" src="https://axios-http.com/assets/sponsors/opencollective/buy-instagram-followers-twicsy.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"><b>twicsy.com</b></a> </p>
|
5
|
+
</td></tr><tr width="33.333333333333336%"><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"> <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"><b>Website</b></a> | <a href="https://docs.descope.com/?utm_source=axios&utm_medium=referral&utm_campaign=axios-oss-sponsorship"><b>Docs</b></a> | <a href="https://www.descope.com/community?utm_source=axios&utm_medium=referral&utm_campaign=axios-oss-sponsorship"><b>Community</b></a> </p>
|
6
|
+
</td><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"> <img width="62px" height="70px" src="https://axios-http.com/assets/sponsors/opencollective/buzzoid-buy-instagram-followers.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"><b>buzzoid.com</b></a> </p>
|
6
7
|
</td><td align="center" width="33.333333333333336%"> <a href="https://www.famety.com/?utm_source=axios&utm_medium=sponsorlist&utm_campaign=sponsorship" style="padding: 10px; display: inline-block"> <img width="70px" height="70px" src="https://axios-http.com/assets/sponsors/opencollective/famety-buy-instagram-followers.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.com/?utm_source=axios&utm_medium=readme_sponsorlist&utm_campaign=sponsorship"><b>www.famety.com</b></a> </p>
|
7
|
-
</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"> <img width="70px" height="70px" src="https://axios-http.com/assets/sponsors/opencollective/instagram-likes.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"><b>poprey.com</b></a> </p>
|
8
|
-
</td
|
8
|
+
</td></tr><tr width="33.333333333333336%"><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"> <img width="70px" height="70px" src="https://axios-http.com/assets/sponsors/opencollective/instagram-likes.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"><b>poprey.com</b></a> </p>
|
9
|
+
</td><td align="center" width="33.333333333333336%"> <a href="https://betking.com.ua/sports-book/?utm_source=axios&utm_medium=sponsorlist&utm_campaign=sponsorship" style="padding: 10px; display: inline-block"> <img width="70px" height="70px" src="https://axios-http.com/assets/sponsors/opencollective/bukmeker.jpeg" alt="Букмекер"/> </a> <p align="center" title="Ставки на спорт, БК в Україні">Ставки на спорт, БК в Україні</p> <p align="center"> <a href="https://betking.com.ua/sports-book/?utm_source=axios&utm_medium=readme_sponsorlist&utm_campaign=sponsorship"><b>betking.com.ua</b></a> </p>
|
9
10
|
</td><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"> <img width="70px" height="70px" src="https://axios-http.com/assets/sponsors/opencollective/youtube-subscribers-ssmarket.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"><b>ssmarket.net</b></a> </p>
|
10
|
-
</td><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"> <img width="85px" height="70px" src="https://axios-http.com/assets/sponsors/opencollective/buy-instagram-followers-twicsy.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"><b>twicsy.com</b></a> </p>
|
11
11
|
</td></tr><tr width="33.333333333333336%"><td align="center" width="33.333333333333336%"> <a href="https://opencollective.com/axios/contribute">💜 Become a sponsor</a>
|
12
12
|
</td><td align="center" width="33.333333333333336%"> <a href="https://opencollective.com/axios/contribute">💜 Become a sponsor</a>
|
13
13
|
</td><td align="center" width="33.333333333333336%"> <a href="https://opencollective.com/axios/contribute">💜 Become a sponsor</a>
|
package/dist/axios.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! Axios v1.
|
1
|
+
/*! Axios v1.9.0 Copyright (c) 2025 Matt Zabriskie and contributors */
|
2
2
|
(function (global, factory) {
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
4
4
|
typeof define === 'function' && define.amd ? define(factory) :
|
@@ -681,6 +681,8 @@
|
|
681
681
|
|
682
682
|
var toString = Object.prototype.toString;
|
683
683
|
var getPrototypeOf = Object.getPrototypeOf;
|
684
|
+
var iterator = Symbol.iterator,
|
685
|
+
toStringTag = Symbol.toStringTag;
|
684
686
|
var kindOf = function (cache) {
|
685
687
|
return function (thing) {
|
686
688
|
var str = toString.call(thing);
|
@@ -813,7 +815,7 @@
|
|
813
815
|
return false;
|
814
816
|
}
|
815
817
|
var prototype = getPrototypeOf(val);
|
816
|
-
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(
|
818
|
+
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
|
817
819
|
};
|
818
820
|
|
819
821
|
/**
|
@@ -1165,10 +1167,10 @@
|
|
1165
1167
|
* @returns {void}
|
1166
1168
|
*/
|
1167
1169
|
var forEachEntry = function forEachEntry(obj, fn) {
|
1168
|
-
var generator = obj && obj[
|
1169
|
-
var
|
1170
|
+
var generator = obj && obj[iterator];
|
1171
|
+
var _iterator = generator.call(obj);
|
1170
1172
|
var result;
|
1171
|
-
while ((result =
|
1173
|
+
while ((result = _iterator.next()) && !result.done) {
|
1172
1174
|
var pair = result.value;
|
1173
1175
|
fn.call(obj, pair[0], pair[1]);
|
1174
1176
|
}
|
@@ -1275,7 +1277,7 @@
|
|
1275
1277
|
* @returns {boolean}
|
1276
1278
|
*/
|
1277
1279
|
function isSpecCompliantForm(thing) {
|
1278
|
-
return !!(thing && isFunction(thing.append) && thing[
|
1280
|
+
return !!(thing && isFunction(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);
|
1279
1281
|
}
|
1280
1282
|
var toJSONObject = function toJSONObject(obj) {
|
1281
1283
|
var stack = new Array(10);
|
@@ -1331,6 +1333,9 @@
|
|
1331
1333
|
|
1332
1334
|
// *********************
|
1333
1335
|
|
1336
|
+
var isIterable = function isIterable(thing) {
|
1337
|
+
return thing != null && isFunction(thing[iterator]);
|
1338
|
+
};
|
1334
1339
|
var utils$1 = {
|
1335
1340
|
isArray: isArray,
|
1336
1341
|
isArrayBuffer: isArrayBuffer,
|
@@ -1387,7 +1392,8 @@
|
|
1387
1392
|
isAsyncFn: isAsyncFn,
|
1388
1393
|
isThenable: isThenable,
|
1389
1394
|
setImmediate: _setImmediate,
|
1390
|
-
asap: asap
|
1395
|
+
asap: asap,
|
1396
|
+
isIterable: isIterable
|
1391
1397
|
};
|
1392
1398
|
|
1393
1399
|
/**
|
@@ -2227,21 +2233,26 @@
|
|
2227
2233
|
setHeaders(header, valueOrRewrite);
|
2228
2234
|
} else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
2229
2235
|
setHeaders(parseHeaders(header), valueOrRewrite);
|
2230
|
-
} else if (utils$1.
|
2231
|
-
var
|
2236
|
+
} else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
|
2237
|
+
var obj = {},
|
2238
|
+
dest,
|
2239
|
+
key;
|
2240
|
+
var _iterator = _createForOfIteratorHelper(header),
|
2232
2241
|
_step;
|
2233
2242
|
try {
|
2234
2243
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
2235
|
-
var
|
2236
|
-
|
2237
|
-
|
2238
|
-
|
2244
|
+
var entry = _step.value;
|
2245
|
+
if (!utils$1.isArray(entry)) {
|
2246
|
+
throw TypeError('Object iterator must return a key-value pair');
|
2247
|
+
}
|
2248
|
+
obj[key = entry[0]] = (dest = obj[key]) ? utils$1.isArray(dest) ? [].concat(_toConsumableArray(dest), [entry[1]]) : [dest, entry[1]] : entry[1];
|
2239
2249
|
}
|
2240
2250
|
} catch (err) {
|
2241
2251
|
_iterator.e(err);
|
2242
2252
|
} finally {
|
2243
2253
|
_iterator.f();
|
2244
2254
|
}
|
2255
|
+
setHeaders(obj, valueOrRewrite);
|
2245
2256
|
} else {
|
2246
2257
|
header != null && setHeader(valueOrRewrite, header, rewrite);
|
2247
2258
|
}
|
@@ -2372,6 +2383,11 @@
|
|
2372
2383
|
return header + ': ' + value;
|
2373
2384
|
}).join('\n');
|
2374
2385
|
}
|
2386
|
+
}, {
|
2387
|
+
key: "getSetCookie",
|
2388
|
+
value: function getSetCookie() {
|
2389
|
+
return this.get("set-cookie") || [];
|
2390
|
+
}
|
2375
2391
|
}, {
|
2376
2392
|
key: _Symbol$toStringTag,
|
2377
2393
|
get: function get() {
|
@@ -3521,7 +3537,7 @@
|
|
3521
3537
|
_context4.prev = 33;
|
3522
3538
|
_context4.t2 = _context4["catch"](4);
|
3523
3539
|
unsubscribe && unsubscribe();
|
3524
|
-
if (!(_context4.t2 && _context4.t2.name === 'TypeError' && /fetch/i.test(_context4.t2.message))) {
|
3540
|
+
if (!(_context4.t2 && _context4.t2.name === 'TypeError' && /Load failed|fetch/i.test(_context4.t2.message))) {
|
3525
3541
|
_context4.next = 38;
|
3526
3542
|
break;
|
3527
3543
|
}
|
@@ -3658,7 +3674,7 @@
|
|
3658
3674
|
});
|
3659
3675
|
}
|
3660
3676
|
|
3661
|
-
var VERSION = "1.
|
3677
|
+
var VERSION = "1.9.0";
|
3662
3678
|
|
3663
3679
|
var validators$1 = {};
|
3664
3680
|
|
@@ -3754,7 +3770,7 @@
|
|
3754
3770
|
var Axios = /*#__PURE__*/function () {
|
3755
3771
|
function Axios(instanceConfig) {
|
3756
3772
|
_classCallCheck(this, Axios);
|
3757
|
-
this.defaults = instanceConfig;
|
3773
|
+
this.defaults = instanceConfig || {};
|
3758
3774
|
this.interceptors = {
|
3759
3775
|
request: new InterceptorManager$1(),
|
3760
3776
|
response: new InterceptorManager$1()
|