wretch:使用直观的语法围绕获取构建的小型包装器
一个小巧的(约3Kb g压缩)包装器,以直观的语法围绕获取。 f [ETCH] [WR] apper Wretch 1.7现已上线:party_popper: !请在每次更新后签出变更,以了解新功能和重大更改。如果您想尝试热门产品,请查看分支。可通过软件包获得中间件集合! :package:目录动机因为必须编写第二个回调来处理响应主体,所以感觉很尴尬。 // Fetch needs a second callback to process the response body fetch ( "examples/example.json" ) . then ( response => response . json ( ) ) . then ( json => { //Do stuff with the parsed json } ) // Wretch does it for you // Use .res for the raw response, .text for raw text, .json for json, .blob for a
wretch-master.zip
预估大小:81个文件
wretch-master
文件夹
.travis.yml
2KB
.nojekyll
文件夹
wretch.svg
4KB
rollup.config.js
677B
docs
文件夹
index.html
8KB
index.css
5KB
package.json
3KB
tslint.json
2KB
...
389.25KB
文件大小:
评论区