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.
24 lines
583 B
24 lines
583 B
|
2 months ago
|
declare const weexFetch: any;
|
||
|
|
export interface WeexFetchResponse {
|
||
|
|
ok: boolean;
|
||
|
|
status: number;
|
||
|
|
statusText: string;
|
||
|
|
data: string;
|
||
|
|
headers: object;
|
||
|
|
}
|
||
|
|
export declare const wrapResponse: (res: WeexFetchResponse) => {
|
||
|
|
ok: boolean;
|
||
|
|
status: number;
|
||
|
|
statusText: string;
|
||
|
|
body: string;
|
||
|
|
headers: object;
|
||
|
|
clone: () => any;
|
||
|
|
text: () => Promise<unknown>;
|
||
|
|
json: () => Promise<unknown>;
|
||
|
|
};
|
||
|
|
/**
|
||
|
|
* 将 weex 的 fetch 封装成标准 fetch
|
||
|
|
*/
|
||
|
|
declare const fetch: (url: string, options?: object) => Promise<unknown>;
|
||
|
|
export { fetch, weexFetch, };
|