diff --git a/axios.d.ts b/axios.d.ts index 2655b95..e335ed1 100644 --- a/axios.d.ts +++ b/axios.d.ts @@ -26,8 +26,8 @@ declare module axios { } interface Promise { - then(response: axios.Response): axios.Promise; - catch(response: axios.Response): axios.Promise; + then(onFulfilled:(response: axios.Response) => void): axios.Promise; + catch(onRejected:(response: axios.Response) => void): axios.Promise; } interface RequestOptions { diff --git a/lib/axios.js b/lib/axios.js index e29e9eb..ca9ba15 100644 --- a/lib/axios.js +++ b/lib/axios.js @@ -9,6 +9,7 @@ var axios = module.exports = function (config) { config = utils.merge({ method: 'get', headers: {}, + timeout: defaults.timeout, transformRequest: defaults.transformRequest, transformResponse: defaults.transformResponse }, config); diff --git a/package.json b/package.json index eb2375e..9429dd3 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "es6-promise": "^3.0.2", "grunt": "^0.4.5", "grunt-banner": "^0.5.0", + "grunt-cli": "^0.1.13", "grunt-contrib-clean": "^0.6.0", "grunt-contrib-nodeunit": "^0.4.1", "grunt-contrib-watch": "^0.6.1", @@ -49,6 +50,7 @@ "karma-webpack": "^1.7.0", "load-grunt-tasks": "^3.2.0", "minimist": "^1.1.3", + "phantomjs": "^1.9.18", "webpack": "^1.11.0", "webpack-dev-server": "^1.10.1" },