my-fetch-plus

v0.0.5
enhance Fetch API experience
ajax request fetch fetch-plus

MyFetchPlus

一个fetch的现代化封装

https://fetch.plus

基本功能

  • 以es6 class封装fetch
  • 自动格式化URL QueryString
  • 根据responseType自动格式化Data
  • 超时取消请求
  • 返回值遵循error first 原则

基本使用

安装

npm i my-fetch-plus --save

or

yarn add my-fetch-plus

引入

可以通过import或require引入

import FetchPlus from 'my-fetch-plus'
const http = new FetchPlus()
http.get('xxxx')

TODO

  • 基本请求封装
  • 只发送简单请求
  • 单元测试
  • 失败重试

参考资料

npm i my-fetch-plus

Metadata

  • MIT
  • Whatever
  • webszy
  • released 10/20/2023

Downloads

Maintainers