json-fetch:ES6的包装器可简化与JSON API的交互

时间:2021-05-14 05:10:02
【文件属性】:
文件名称:json-fetch:ES6的包装器可简化与JSON API的交互
文件大小:147KB
文件格式:ZIP
更新时间:2021-05-14 05:10:02
fetch JavaScript JSON提取 ES6的包装程序可简化与JSON API的交互。 自动JSON字符串化请求正文 设置JSON请求标头 使用json解析Content-Type任何响应: application/json标头 默认包含请求凭证 请求的可配置重试选项 用法 yarn add json-fetch # or... npm install json-fetch import jsonFetch from 'json-fetch' ; jsonFetch ( 'http://www.test.com/products/1234' , { body : { name : 'apple' } , // content to be JSON stringified credentials : 'omit' , // "include" by default expectedStatuses
【文件预览】:
json-fetch-master
----.flowconfig(112B)
----.gitattributes(37B)
----yarn.lock(220KB)
----src()
--------test.js(13KB)
--------index.js.flow(1KB)
--------get_request_options()
--------retriers.js(311B)
--------index.js(3KB)
----.vscode()
--------launch.json(565B)
--------settings.json(93B)
--------tasks.json(292B)
----flow-typed()
--------npm()
----.npmignore(10B)
----.travis.yml(1KB)
----LICENSE.md(1KB)
----README.md(4KB)
----.npmrc(96B)
----.editorconfig(173B)
----CODE_OF_CONDUCT.md(4KB)
----.gitignore(69B)
----.prettierrc.js(68B)
----CHANGELOG.md(638B)
----.eslintignore(62B)
----package.json(4KB)
----mocha.opts(34B)

网友评论