import { HTTPConfig } from '../typings'; import HTTP from '../core/http'; /** * RESTful API */ export declare class RESTful { private prefix; private http; static http: HTTP | void; constructor(prefix: string, http?: HTTP | HTTPConfig); /** * 获取 */ get: (query?: Partial | undefined) => Promise; /** * 新增 */ post: (body: Partial) => Promise; /** * 更新指定全部信息 */ put: (id: number | string, body: Partial) => Promise; /** * 更新指定部分信息 */ patch: (id: number | string, body: Partial) => Promise; /** * 删除指定 */ delete: (id: number | string) => Promise; }