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:
@@ -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
|
||||
|
||||
@@ -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
@@ -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] = {};
|
||||
});
|
||||
|
||||
|
||||
@@ -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();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user