2
0
mirror of https://github.com/tenrok/axios.git synced 2026-05-30 15:24:11 +03:00

Documents the timeout default

This commit is contained in:
MiguelMadero
2018-02-14 17:49:39 -08:00
parent 40b829994c
commit f7310ca083
2 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -411,7 +411,7 @@ instance.defaults.headers.common['Authorization'] = AUTH_TOKEN;
### Config order of precedence
Config will be merged with an order of precedence. The order is library defaults found in `lib/defaults.js`, then `defaults` property of the instance, and finally `config` argument for the request. The latter will take precedence over the former. Here's an example.
Config will be merged with an order of precedence. The order is library defaults found in [lib/defaults.js](https://github.com/axios/axios/blob/master/lib/defaults.js#L28), then `defaults` property of the instance, and finally `config` argument for the request. The latter will take precedence over the former. Here's an example.
```js
// Create an instance using the config defaults provided by the library
+4
View File
@@ -63,6 +63,10 @@ var defaults = {
return data;
}],
/**
* A timeout in milliseconds to abort a request. If set to 0 (default) a
* timeout is not created.
*/
timeout: 0,
xsrfCookieName: 'XSRF-TOKEN',