mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
Releasing 0.16.0
This commit is contained in:
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "axios",
|
"name": "axios",
|
||||||
"main": "./dist/axios.js",
|
"main": "./dist/axios.js",
|
||||||
"version": "0.15.3",
|
"version": "0.16.0",
|
||||||
"homepage": "https://github.com/mzabriskie/axios",
|
"homepage": "https://github.com/mzabriskie/axios",
|
||||||
"authors": [
|
"authors": [
|
||||||
"Matt Zabriskie"
|
"Matt Zabriskie"
|
||||||
|
|||||||
Vendored
+14
-10
@@ -1,4 +1,4 @@
|
|||||||
/* axios v0.15.3 | (c) 2016 by Matt Zabriskie */
|
/* axios v0.16.0 | (c) 2017 by Matt Zabriskie */
|
||||||
(function webpackUniversalModuleDefinition(root, factory) {
|
(function webpackUniversalModuleDefinition(root, factory) {
|
||||||
if(typeof exports === 'object' && typeof module === 'object')
|
if(typeof exports === 'object' && typeof module === 'object')
|
||||||
module.exports = factory();
|
module.exports = factory();
|
||||||
@@ -296,13 +296,15 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
* typeof document -> undefined
|
* typeof document -> undefined
|
||||||
*
|
*
|
||||||
* react-native:
|
* react-native:
|
||||||
* typeof document.createElement -> undefined
|
* navigator.product -> 'ReactNative'
|
||||||
*/
|
*/
|
||||||
function isStandardBrowserEnv() {
|
function isStandardBrowserEnv() {
|
||||||
|
if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
typeof window !== 'undefined' &&
|
typeof window !== 'undefined' &&
|
||||||
typeof document !== 'undefined' &&
|
typeof document !== 'undefined'
|
||||||
typeof document.createElement === 'function'
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -504,7 +506,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Provide aliases for supported request methods
|
// Provide aliases for supported request methods
|
||||||
utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
|
utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
|
||||||
/*eslint func-names:0*/
|
/*eslint func-names:0*/
|
||||||
Axios.prototype[method] = function(url, config) {
|
Axios.prototype[method] = function(url, config) {
|
||||||
return this.request(utils.merge(config || {}, {
|
return this.request(utils.merge(config || {}, {
|
||||||
@@ -537,7 +539,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
var utils = __webpack_require__(2);
|
var utils = __webpack_require__(2);
|
||||||
var normalizeHeaderName = __webpack_require__(6);
|
var normalizeHeaderName = __webpack_require__(6);
|
||||||
|
|
||||||
var PROTECTION_PREFIX = /^\)\]\}',?\n/;
|
|
||||||
var DEFAULT_CONTENT_TYPE = {
|
var DEFAULT_CONTENT_TYPE = {
|
||||||
'Content-Type': 'application/x-www-form-urlencoded'
|
'Content-Type': 'application/x-www-form-urlencoded'
|
||||||
};
|
};
|
||||||
@@ -590,7 +591,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
transformResponse: [function transformResponse(data) {
|
transformResponse: [function transformResponse(data) {
|
||||||
/*eslint no-param-reassign:0*/
|
/*eslint no-param-reassign:0*/
|
||||||
if (typeof data === 'string') {
|
if (typeof data === 'string') {
|
||||||
data = data.replace(PROTECTION_PREFIX, '');
|
|
||||||
try {
|
try {
|
||||||
data = JSON.parse(data);
|
data = JSON.parse(data);
|
||||||
} catch (e) { /* Ignore */ }
|
} catch (e) { /* Ignore */ }
|
||||||
@@ -616,7 +616,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
utils.forEach(['delete', 'get', 'head'], function forEachMehtodNoData(method) {
|
utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
|
||||||
defaults.headers[method] = {};
|
defaults.headers[method] = {};
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -788,7 +788,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
try {
|
try {
|
||||||
request.responseType = config.responseType;
|
request.responseType = config.responseType;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (request.responseType !== 'json') {
|
// Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.
|
||||||
|
// But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.
|
||||||
|
if (config.responseType !== 'json') {
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1413,7 +1415,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
* @returns {string} The combined URL
|
* @returns {string} The combined URL
|
||||||
*/
|
*/
|
||||||
module.exports = function combineURLs(baseURL, relativeURL) {
|
module.exports = function combineURLs(baseURL, relativeURL) {
|
||||||
return baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '');
|
return relativeURL
|
||||||
|
? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
|
||||||
|
: baseURL;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+2
-2
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "axios",
|
"name": "axios",
|
||||||
"version": "0.15.3",
|
"version": "0.16.0",
|
||||||
"description": "Promise based HTTP client for the browser and node.js",
|
"description": "Promise based HTTP client for the browser and node.js",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user