2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-05 16:42:32 +03:00

remove PROTECTION_PREFIX support

This commit is contained in:
Dominykas Blyžė
2016-11-28 11:16:55 +00:00
parent 4976816808
commit eaba7875fc
-2
View File
@@ -3,7 +3,6 @@
var utils = require('./utils');
var normalizeHeaderName = require('./helpers/normalizeHeaderName');
var PROTECTION_PREFIX = /^\)\]\}',?\n/;
var DEFAULT_CONTENT_TYPE = {
'Content-Type': 'application/x-www-form-urlencoded'
};
@@ -56,7 +55,6 @@ var defaults = {
transformResponse: [function transformResponse(data) {
/*eslint no-param-reassign:0*/
if (typeof data === 'string') {
data = data.replace(PROTECTION_PREFIX, '');
try {
data = JSON.parse(data);
} catch (e) { /* Ignore */ }