diff options
Diffstat (limited to 'js/fetch.ts')
-rw-r--r-- | js/fetch.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/js/fetch.ts b/js/fetch.ts index 4f225b507..48429ca19 100644 --- a/js/fetch.ts +++ b/js/fetch.ts @@ -20,6 +20,7 @@ import { FormData } from "./dom_types"; import { TextDecoder } from "./text_encoding"; +import { DenoBlob } from "./blob"; interface Header { name: string; @@ -134,8 +135,10 @@ class FetchResponse implements Response { } async blob(): Promise<Blob> { - notImplemented(); - return {} as Blob; + const arrayBuffer = await this.arrayBuffer(); + return new DenoBlob([arrayBuffer], { + type: this.headers.get("content-type") || "" + }); } async formData(): Promise<FormData> { |