全局http请求的基于fetch polyfill的whatwg-fetch库
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
Object | 全局请求的配置设置参数 Properties
|
|||||||||||||||||||||||||||||||
tokenStorage |
Object | token的增删改方法 Properties
|
|||||||||||||||||||||||||||||||
url |
String | 请求url[注意把前缀除开] |
|||||||||||||||||||||||||||||||
options |
Object |
<optional> |
对fetch标准options参数进行扩展, 单个请求的参数设置在options上 Properties
|
- Version:
- v0.01
- Source:
- See:
Returns:
- 请求返回处理的promise对象
- Type
- function