2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-20 20:00:40 +03:00

Releasing 0.14.0

This commit is contained in:
Nick Uraltsev
2016-08-27 11:29:52 -07:00
parent 66ec8c0a32
commit c96348660d
6 changed files with 22 additions and 15 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"name": "axios", "name": "axios",
"main": "./dist/axios.js", "main": "./dist/axios.js",
"version": "0.13.1", "version": "0.14.0",
"homepage": "https://github.com/mzabriskie/axios", "homepage": "https://github.com/mzabriskie/axios",
"authors": [ "authors": [
"Matt Zabriskie" "Matt Zabriskie"
+16 -9
View File
@@ -1,4 +1,4 @@
/* axios v0.13.1 | (c) 2016 by Matt Zabriskie */ /* axios v0.14.0 | (c) 2016 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();
@@ -87,7 +87,7 @@ return /******/ (function(modules) { // webpackBootstrap
} }
// Create the default instance to be exported // Create the default instance to be exported
var axios = module.exports = createInstance(); var axios = createInstance();
// Expose Axios class to allow class inheritance // Expose Axios class to allow class inheritance
axios.Axios = Axios; axios.Axios = Axios;
@@ -103,6 +103,11 @@ return /******/ (function(modules) { // webpackBootstrap
}; };
axios.spread = __webpack_require__(21); axios.spread = __webpack_require__(21);
module.exports = axios;
// Allow use of default import syntax in TypeScript
module.exports.default = axios;
/***/ }, /***/ },
/* 2 */ /* 2 */
@@ -887,7 +892,7 @@ return /******/ (function(modules) { // webpackBootstrap
var cookies = __webpack_require__(18); var cookies = __webpack_require__(18);
// Add xsrf header // Add xsrf header
var xsrfValue = config.withCredentials || isURLSameOrigin(config.url) ? var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ?
cookies.read(config.xsrfCookieName) : cookies.read(config.xsrfCookieName) :
undefined; undefined;
@@ -926,14 +931,16 @@ return /******/ (function(modules) { // webpackBootstrap
} }
// Handle progress if needed // Handle progress if needed
if (typeof config.progress === 'function') { if (typeof config.onDownloadProgress === 'function') {
if (config.method === 'post' || config.method === 'put') { request.addEventListener('progress', config.onDownloadProgress);
request.upload.addEventListener('progress', config.progress);
} else if (config.method === 'get') {
request.addEventListener('progress', config.progress);
}
} }
// Not all browsers support upload events
if (typeof config.onUploadProgress === 'function' && request.upload) {
request.upload.addEventListener('progress', config.onUploadProgress);
}
if (requestData === undefined) { if (requestData === undefined) {
requestData = null; requestData = null;
} }
+1 -1
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "axios", "name": "axios",
"version": "0.13.1", "version": "0.14.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": {