fe5b3ec15b2c9d8a4aa7b923f5bbe98c58bd539d
feat: add publish workflow feat: 添加queryclient fix: 修改路径 feat: 添加手动执行workflows fix: 修改package.json fix: fix publish fix: publish test fix temp
query
对应的 fetch 内容的一部分功能的封装。
主要目的:请求路径默认/api/router,使用post,post的数据分流使用path和key.
query
const query = new Query();
const res = await query.post({
path: 'demo',
key: '1',
});
参数
type QueryOpts = {
url?: string;
adapter?: typeof adapter;
headers?: Record<string, string>;
timeout?: number;
};
type Data = {
path?: string;
key?: string;
[key: string]: any;
};
// 额外功能
type DataOpts = Partial<QueryOpts> & {
beforeRequest?: Fn;
};
Description
Languages
TypeScript
88.9%
JavaScript
11.1%