You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
676 B
21 lines
676 B
/**
|
|
* liteapp 请求方法重写
|
|
*
|
|
* @param opts
|
|
* @returns
|
|
*/
|
|
export interface OriginRequestResp {
|
|
status: number;
|
|
data?: any;
|
|
}
|
|
export interface OriginRequestReq extends RequestInit {
|
|
url: RequestInfo;
|
|
}
|
|
export declare const originRequest: (opts: OriginRequestReq) => Promise<OriginRequestResp>;
|
|
export interface HackFetchOptions {
|
|
name: string;
|
|
beforeFetch?: (url: string, option: RequestInit) => void;
|
|
then?: (res: Response, duration: number, url: string, option?: RequestInit) => void;
|
|
catch?: (err: any, duration: number, url: string, option?: RequestInit) => void;
|
|
}
|
|
export declare const hackFetch: (options: HackFetchOptions) => void;
|
|
|