2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-17 19:21:29 +03:00

Revert "fix: silentJSONParsing=false should throw on invalid JSON (#7253) (#7…" (#7298)

This reverts commit 7d19335e43.
This commit is contained in:
Jay
2025-12-08 14:19:20 +02:00
committed by GitHub
parent e0a120620e
commit a4230f5581
2 changed files with 2 additions and 71 deletions
+2 -2
View File
@@ -108,7 +108,7 @@ const defaults = {
if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
const silentJSONParsing = transitional && transitional.silentJSONParsing;
const strictJSONParsing = !silentJSONParsing;
const strictJSONParsing = !silentJSONParsing && JSONRequested;
try {
return JSON.parse(data, this.parseReviver);
@@ -158,4 +158,4 @@ utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
defaults.headers[method] = {};
});
export default defaults;
export default defaults;