UNPKG

mux-fetch

Version:
14 lines (13 loc) 720 B
import { FastOptions, FetchOptions, GlobalConfig } from "./@types/"; /** * 默认加上请求方法,第二个参数约定为请求参数 */ export declare const fastFetchFactory: (fetch: any, opts: FastOptions) => (api: string, params?: any, ...args: any[]) => any; export declare const fetchWebapi: { (api: string, opts?: FetchOptions, getConfig?: () => GlobalConfig): Promise<any>; get: (api: string, params?: any, ...args: any[]) => any; post: (api: string, params?: any, ...args: any[]) => any; put: (api: string, params?: any, ...args: any[]) => any; delete: (api: string, params?: any, ...args: any[]) => any; upload: (api: string, params?: any, ...args: any[]) => any; };