mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
Make fetch API more standards compliant (#3667)
This commit is contained in:
parent
fba40d86c4
commit
2b0cf74a8f
5 changed files with 194 additions and 9 deletions
5
cli/js/lib.deno.shared_globals.d.ts
vendored
5
cli/js/lib.deno.shared_globals.d.ts
vendored
|
@ -1083,7 +1083,7 @@ declare namespace __fetch {
|
|||
readonly url: string;
|
||||
readonly status: number;
|
||||
statusText: string;
|
||||
readonly type = "basic";
|
||||
readonly type: __domTypes.ResponseType;
|
||||
readonly redirected: boolean;
|
||||
headers: __domTypes.Headers;
|
||||
readonly trailer: Promise<__domTypes.Headers>;
|
||||
|
@ -1092,9 +1092,11 @@ declare namespace __fetch {
|
|||
constructor(
|
||||
url: string,
|
||||
status: number,
|
||||
statusText: string,
|
||||
headersList: Array<[string, string]>,
|
||||
rid: number,
|
||||
redirected_: boolean,
|
||||
type_?: null | __domTypes.ResponseType,
|
||||
body_?: null | Body
|
||||
);
|
||||
arrayBuffer(): Promise<ArrayBuffer>;
|
||||
|
@ -1104,6 +1106,7 @@ declare namespace __fetch {
|
|||
text(): Promise<string>;
|
||||
readonly ok: boolean;
|
||||
clone(): __domTypes.Response;
|
||||
redirect(url: URL | string, status: number): __domTypes.Response;
|
||||
}
|
||||
/** Fetch a resource from the network. */
|
||||
export function fetch(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue