mirror of
https://github.com/tenrok/axios.git
synced 2026-06-05 16:42:32 +03:00
Releasing 0.16.0
This commit is contained in:
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "axios",
|
||||
"main": "./dist/axios.js",
|
||||
"version": "0.15.3",
|
||||
"version": "0.16.0",
|
||||
"homepage": "https://github.com/mzabriskie/axios",
|
||||
"authors": [
|
||||
"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) {
|
||||
if(typeof exports === 'object' && typeof module === 'object')
|
||||
module.exports = factory();
|
||||
@@ -296,13 +296,15 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
* typeof document -> undefined
|
||||
*
|
||||
* react-native:
|
||||
* typeof document.createElement -> undefined
|
||||
* navigator.product -> 'ReactNative'
|
||||
*/
|
||||
function isStandardBrowserEnv() {
|
||||
if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {
|
||||
return false;
|
||||
}
|
||||
return (
|
||||
typeof window !== 'undefined' &&
|
||||
typeof document !== 'undefined' &&
|
||||
typeof document.createElement === 'function'
|
||||
typeof document !== 'undefined'
|
||||
);
|
||||
}
|
||||
|
||||
@@ -504,7 +506,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
};
|
||||
|
||||
// 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*/
|
||||
Axios.prototype[method] = function(url, config) {
|
||||
return this.request(utils.merge(config || {}, {
|
||||
@@ -537,7 +539,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
var utils = __webpack_require__(2);
|
||||
var normalizeHeaderName = __webpack_require__(6);
|
||||
|
||||
var PROTECTION_PREFIX = /^\)\]\}',?\n/;
|
||||
var DEFAULT_CONTENT_TYPE = {
|
||||
'Content-Type': 'application/x-www-form-urlencoded'
|
||||
};
|
||||
@@ -590,7 +591,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
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 */ }
|
||||
@@ -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] = {};
|
||||
});
|
||||
|
||||
@@ -788,7 +788,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
try {
|
||||
request.responseType = config.responseType;
|
||||
} 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;
|
||||
}
|
||||
}
|
||||
@@ -1413,7 +1415,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
* @returns {string} The combined URL
|
||||
*/
|
||||
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",
|
||||
"version": "0.15.3",
|
||||
"version": "0.16.0",
|
||||
"description": "Promise based HTTP client for the browser and node.js",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user