mirror of
https://github.com/tenrok/axios.git
synced 2026-05-21 13:24:11 +03:00
Merge pull request #561 from dominykas/remove-protection-prefix
Removing PROTECTION_PREFIX support
This commit is contained in:
@@ -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 */ }
|
||||
|
||||
Reference in New Issue
Block a user