multiple libraries, add request and cookie

This commit is contained in:
2023-03-30 00:20:35 +08:00
parent ad8fe8fa85
commit 1d636cdc79
11 changed files with 143 additions and 23 deletions

9
lib/utility/request.d.ts vendored Normal file
View File

@ -0,0 +1,9 @@
interface RequestOptions {
method?: string;
contentType?: string;
customerHeaders?: { [key: string]: string };
signal?: AbortSignal | null;
}
export function get(url: string, options?: RequestOptions): Promise<Response>
export function post(url: string, data?: BodyInit | null, options?: RequestOptions): Promise<Response>