UNPKG
kit-request
Version:
latest (1.0.2)
1.0.2
1.0.1
1.0.0
定制处理数据请求,fetch使用 isomorphic-fetch,xhr 使用 axios
github.com/jskit/kit-request
jskit/kit-request
kit-request
/
fetch.js
14 lines
(9 loc)
•
323 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/
/
dva
/
fetch
即 isomorphic
-
fetch
/
/
import
fetch
from
'dva/fetch'
/
/
低版本支持需要,如 IE
/
/
require(
'es6-promise'
).polyfill()
/
/
客户端使用 whatwg
-
fetch
/
/
服务端使用 node
-
fetch
/
/
"browser": "fetch-npm-browserify.js",
/
/
"main": "fetch-npm-node.js", module.exports
=
require(
'isomorphic-fetch'
);