2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-08 17:22:34 +03:00

Merge branch 'master' into patch-1

This commit is contained in:
Nick Uraltsev
2017-03-01 21:03:55 -08:00
committed by GitHub
4 changed files with 6 additions and 2 deletions
+1
View File
@@ -11,3 +11,4 @@ This is a list of axios related libraries and resources. If you have a suggestio
* [axios-vcr](https://github.com/nettofarah/axios-vcr) - 📼 Record and Replay Axios requests
* [@3846masa/axios-cookiejar-support](https://github.com/3846masa/axios-cookiejar-support) - Add tough-cookie support to axios
* [axios-debug-log](https://github.com/Gerhut/axios-debug-log) - Axios interceptor of logging requests & responses by debug.
* [axios-method-override](https://github.com/jacobbuck/axios-method-override) - Axios http request method override plugin
+1 -1
View File
@@ -473,7 +473,7 @@ axios.get('/user/12345', {
You can cancel a request using a *cancel token*.
> The axios cancel token API is based on the [cancelable promises proposal](https://github.com/tc39/proposal-cancelable-promises), which is currently at Stage 1.
> The axios cancel token API is based on the withdrawn [cancelable promises proposal](https://github.com/tc39/proposal-cancelable-promises).
You can create a cancel token using the `CancelToken.source` factory as shown below:
+1 -1
View File
@@ -80,7 +80,7 @@ defaults.headers = {
}
};
utils.forEach(['delete', 'get', 'head'], function forEachMehtodNoData(method) {
utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
defaults.headers[method] = {};
});
+3
View File
@@ -51,6 +51,9 @@ describe('requests', function () {
expect(reason.config.method).toBe('get');
expect(reason.config.url).toBe('http://thisisnotaserver');
// re-enable jasmine.Ajax
jasmine.Ajax.install();
done();
};