2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-17 19:21:29 +03:00
This commit is contained in:
Matt Zabriskie
2016-05-17 09:59:06 -06:00
parent f5a990a1f1
commit 2e949495f0
6 changed files with 11 additions and 12 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"name": "axios", "name": "axios",
"main": "./dist/axios.js", "main": "./dist/axios.js",
"version": "0.11.0", "version": "0.11.1",
"homepage": "https://github.com/mzabriskie/axios", "homepage": "https://github.com/mzabriskie/axios",
"authors": [ "authors": [
"Matt Zabriskie" "Matt Zabriskie"
+5 -6
View File
@@ -1,4 +1,4 @@
/* axios v0.11.0 | (c) 2016 by Matt Zabriskie */ /* axios v0.11.1 | (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();
@@ -141,6 +141,7 @@ return /******/ (function(modules) { // webpackBootstrap
var defaultInstance = new Axios(defaults); var defaultInstance = new Axios(defaults);
var axios = module.exports = bind(Axios.prototype.request, defaultInstance); var axios = module.exports = bind(Axios.prototype.request, defaultInstance);
module.exports.Axios = Axios;
// Expose properties from defaultInstance // Expose properties from defaultInstance
axios.defaults = defaultInstance.defaults; axios.defaults = defaultInstance.defaults;
@@ -293,7 +294,7 @@ return /******/ (function(modules) { // webpackBootstrap
* @returns {boolean} True if value is an FormData, otherwise false * @returns {boolean} True if value is an FormData, otherwise false
*/ */
function isFormData(val) { function isFormData(val) {
return toString.call(val) === '[object FormData]'; return (typeof FormData !== 'undefined') && (val instanceof FormData);
} }
/** /**
@@ -599,6 +600,8 @@ return /******/ (function(modules) { // webpackBootstrap
request = new window.XDomainRequest(); request = new window.XDomainRequest();
loadEvent = 'onload'; loadEvent = 'onload';
xDomain = true; xDomain = true;
request.onprogress = function handleProgress() {};
request.ontimeout = function handleTimeout() {};
} }
// HTTP basic authentication // HTTP basic authentication
@@ -613,10 +616,6 @@ return /******/ (function(modules) { // webpackBootstrap
// Set the request timeout in MS // Set the request timeout in MS
request.timeout = config.timeout; request.timeout = config.timeout;
// For IE 9 CORS support.
request.onprogress = function handleProgress() {};
request.ontimeout = function handleTimeout() {};
// Listen for ready state // Listen for ready state
request[loadEvent] = function handleLoad() { request[loadEvent] = function handleLoad() {
if (!request || (request.readyState !== 4 && !xDomain)) { if (!request || (request.readyState !== 4 && !xDomain)) {
+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.11.0", "version": "0.11.1",
"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": {