diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2020-04-10 09:51:17 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-10 09:51:17 -0400 |
commit | 02bc58d83253fd3be61787bb28b6b02e3aa71092 (patch) | |
tree | 287491a848ee9fecf1e1e983841f040bc9bec0a4 /cli/js/web/fetch.ts | |
parent | be71885628c3820cc4e62d229326de16a6830fec (diff) |
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
Diffstat (limited to 'cli/js/web/fetch.ts')
-rw-r--r-- | cli/js/web/fetch.ts | 2 |
1 files changed, 1 insertions, 1 deletions
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." |