@ferry-core/ferry
v0.1.2
Published
common fetch tool for ferry service
Downloads
6
Readme
@ferry-core/ferry
🌴 ferry core tool 🌴
🌱 Features
- Http request core tool based on oar
🚀 Quick start
Installation
npm install --save @ferry-core/ferry # 或 yarn add @ferry-core/ferry
How to use
First:Import by commonjs or es module:
import ferry, {
ferry,
ferryGet,
ferryPst,
ferryPut,
ferryDel,
} from '@ferry-core/ferry';
ferry Ferry class singleton binding oarClient instance object
ferry Ferry class singleton instance
ferryGet Get method
const res = await ferryGet({ url: 'xxx', params: {} }).catch((err) => err);
ferryPst Post method
const res = await ferryPst({ url: 'xxx', data: {} }).catch((err) => err);
ferryPut Put method
const res = await ferryPut({ url: 'xxx', params: {} }).catch((err) => err);
ferryDel Delete method
const res = await ferryDel({ url: 'xxx', params: {} }).catch((err) => err);
😉😘 If you feel it is helpful, please click ⭐️Star Thanks~
License
Copyright (c) 2020-present,