From 02bc58d83253fd3be61787bb28b6b02e3aa71092 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Fri, 10 Apr 2020 09:51:17 -0400 Subject: BREAKING: Make fetch API more web compatible (#4687) - Removes the __fetch namespace from `deno types` - Response.redirect should be a static. - Response.body should not be AsyncIterable. - Disables the deno_proxy benchmark - Makes std/examples/curl.ts buffer the body before printing to stdout --- cli/js/web/fetch.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cli/js/web/fetch.ts') diff --git a/cli/js/web/fetch.ts b/cli/js/web/fetch.ts index 6438838c7..26c5ff053 100644 --- a/cli/js/web/fetch.ts +++ b/cli/js/web/fetch.ts @@ -447,7 +447,7 @@ export class Response implements domTypes.Response { ); } - redirect(url: URL | string, status: number): domTypes.Response { + static redirect(url: URL | string, status: number): domTypes.Response { if (![301, 302, 303, 307, 308].includes(status)) { throw new RangeError( "The redirection status must be one of 301, 302, 303, 307 and 308." -- cgit v1.2.3