没有合适的资源?快使用搜索试试~ 我知道了~
XHR的简单封装xr.zip
共20个文件
ts:4个
json:4个
js:3个
需积分: 16 0 下载量 76 浏览量
2019-07-19
07:28:27
上传
评论
收藏 28KB ZIP 举报
温馨提示
xr 是 XMLHttpRequest 的超简单封装,并返回 ES6 Promise。示例代码:xr.get('/api/items', {take: 5}) .then(res => console.log(res.data)); xr.post('/api/item', {name: 'hello'}) .then(res => console.log("new item", res.data)); xr({ method: xr.Methods.GET, url: '/api/items', params: {take: 5}, events: { progress: (xhr, xhrProgressEvent) => { console.log("xhr", xhr); console.log("progress", xhrProgressEvent); } } });
资源推荐
资源详情
资源评论
收起资源包目录
xr-master.zip (20个子文件)
xr-master
.eslintrc 1KB
xr.js 4KB
package.json 967B
tslint.json 2KB
tsfmt.json 682B
LICENSE 1KB
constants.d.ts 647B
src
xr.ts 4KB
constants.ts 757B
.npmignore 5B
tsconfig.json 562B
index.d.ts 1KB
AUTHORS 323B
.gitignore 39B
webpack.config.js 759B
CHANGELOG.md 2KB
README.md 3KB
yarn.lock 49KB
scripts
rename.js 107B
.editorconfig 49B
共 20 条
- 1
资源评论
weixin_39841882
- 粉丝: 443
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功