提交 2ebdd2de 编写于 作者: M Matt Zabriskie

Merge pull request #280 from nickuraltsev/ecosystem

Adding ECOSYSTEM.md and Resources section
# Ecosystem
This is a list of axios related libraries and resources. If you have a suggestion on what to add, please don't hesitate to submit a PR.
## Libraries
* [axios-response-logger](https://github.com/srph/axios-response-logger) - Axios interceptor which logs responses
* [axios-mock-adapter](https://github.com/ctimmerm/axios-mock-adapter) — Axios adapter that allows to easily mock requests
* [redux-axios-middleware](https://github.com/svrcekmichal/redux-axios-middleware) - Redux middleware for fetching data with axios HTTP client
...@@ -180,12 +180,12 @@ These are the available config options for making requests. Only the `url` is re ...@@ -180,12 +180,12 @@ These are the available config options for making requests. Only the `url` is re
{ {
// `url` is the server URL that will be used for the request // `url` is the server URL that will be used for the request
url: '/user', url: '/user',
// `method` is the request method to be used when making the request // `method` is the request method to be used when making the request
method: 'get', // default method: 'get', // default
// `baseURL` will be prepended to `url` unless `url` is absolute. // `baseURL` will be prepended to `url` unless `url` is absolute.
// It can be convenient to set `baseURL` for an instance of axios to pass relative URLs // It can be convenient to set `baseURL` for an instance of axios to pass relative URLs
// to methods of that instance. // to methods of that instance.
baseURL: 'https://some-domain.com/api/', baseURL: 'https://some-domain.com/api/',
...@@ -264,7 +264,7 @@ These are the available config options for making requests. Only the `url` is re ...@@ -264,7 +264,7 @@ These are the available config options for making requests. Only the `url` is re
progress: function(progressEvent) { progress: function(progressEvent) {
// Do whatever you want with the native progress event // Do whatever you want with the native progress event
}, },
// `maxContentLength` defines the max size of the http response content allowed // `maxContentLength` defines the max size of the http response content allowed
maxContentLength: 2000 maxContentLength: 2000
} }
...@@ -346,7 +346,7 @@ instance.defaults.timeout = 2500; ...@@ -346,7 +346,7 @@ instance.defaults.timeout = 2500;
// Override timeout for this request as it's known to take a long time // Override timeout for this request as it's known to take a long time
instance.get('/longRequest', { instance.get('/longRequest', {
timeout: 5000 timeout: 5000
}); });
``` ```
## Interceptors ## Interceptors
...@@ -423,6 +423,13 @@ import * as axios from 'axios'; ...@@ -423,6 +423,13 @@ import * as axios from 'axios';
axios.get('/user?ID=12345'); axios.get('/user?ID=12345');
``` ```
## Resources
* [Changelog](https://github.com/mzabriskie/axios/blob/master/CHANGELOG.md)
* [Ecosystem](https://github.com/mzabriskie/axios/blob/master/ECOSYSTEM.md)
* [Contributing Guide](https://github.com/mzabriskie/axios/blob/master/CONTRIBUTING.md)
* [Code of Conduct](https://github.com/mzabriskie/axios/blob/master/CODE_OF_CONDUCT.md)
## Credits ## Credits
axios is heavily inspired by the [$http service](https://docs.angularjs.org/api/ng/service/$http) provided in [Angular](https://angularjs.org/). Ultimately axios is an effort to provide a standalone `$http`-like service for use outside of Angular. axios is heavily inspired by the [$http service](https://docs.angularjs.org/api/ng/service/$http) provided in [Angular](https://angularjs.org/). Ultimately axios is an effort to provide a standalone `$http`-like service for use outside of Angular.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册