mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
Adding ESLint
This commit is contained in:
+3
-3
@@ -1,5 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
var utils = require('./utils');
|
||||
|
||||
var JSON_START = /^\s*(\[|\{[^\{])/;
|
||||
@@ -11,6 +9,7 @@ var DEFAULT_CONTENT_TYPE = {
|
||||
|
||||
module.exports = {
|
||||
transformRequest: [function (data, headers) {
|
||||
'use strict';
|
||||
if (utils.isArrayBuffer(data)) {
|
||||
return data;
|
||||
}
|
||||
@@ -28,6 +27,7 @@ module.exports = {
|
||||
}],
|
||||
|
||||
transformResponse: [function (data) {
|
||||
'use strict';
|
||||
if (typeof data === 'string') {
|
||||
data = data.replace(PROTECTION_PREFIX, '');
|
||||
if (JSON_START.test(data) && JSON_END.test(data)) {
|
||||
@@ -48,4 +48,4 @@ module.exports = {
|
||||
|
||||
xsrfCookieName: 'XSRF-TOKEN',
|
||||
xsrfHeaderName: 'X-XSRF-TOKEN'
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user