mirror of
https://git.coolaj86.com/coolaj86/request.js
synced 2025-04-21 06:40:38 +00:00
update types
This commit is contained in:
parent
982786ceae
commit
84d1095134
22
types.d.ts
vendored
22
types.d.ts
vendored
@ -21,4 +21,26 @@ declare namespace root__request {
|
|||||||
|
|
||||||
function put(opts: any, ...args: any[]): any;
|
function put(opts: any, ...args: any[]): any;
|
||||||
|
|
||||||
|
type Headers = Record<string, string | string[]>;
|
||||||
|
|
||||||
|
interface RequestOptions {
|
||||||
|
body ?: any;
|
||||||
|
form ?: any;
|
||||||
|
headers ?: Headers;
|
||||||
|
method ?: string;
|
||||||
|
json ?: boolean | any;
|
||||||
|
url: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Response {
|
||||||
|
body: any;
|
||||||
|
headers: Headers;
|
||||||
|
ok: boolean;
|
||||||
|
response ?: any;
|
||||||
|
request ?: any;
|
||||||
|
status: string;
|
||||||
|
statusCode: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
function Request(opts: RequestOptions): Response;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user