README
Languages
English | δΈζ
Browsers
Chrome | Firefox | Edge | Safari | IE |
---|---|---|---|---|
β latest | β latest | β latest | β latest | β Not Support |
Features
- β¨ Built-in common request encapsulation and default configuration, no additional configuration required.
- β¨ Flexible middleware system that processes data in different scenarios through different combinations of middleware.
- β¨ Data emulation of each request is supported to obtain simulated data returned by the interface at development.
- β¨ Written entirely in TypeScript, the complete type system is much easier to use.
- β¨ Data is returned as a stream and can be read and operated at the same time to speed up interface processing.
- β¨ Request payload and response data are automatically converted without manual conversion.
Install
NPM
>$ npm install fatcher
CDN
<script src="https://cdn.jsdelivr.net/npm/fatcher/dist/fatcher.min.js"></script>
usage
import { fatcher } from 'fatcher';
fatcher(
'/api/my/request/url', //request url
{
//options
method: 'get',
payload: {
a: 1,
b: 2,
c: 3,
},
}
)
.then(res => {
// response here
})
.catch(err => {
// request error here.
});
More
More information in document