diff options
Diffstat (limited to 'cli/js/web/fetch.ts')
-rw-r--r-- | cli/js/web/fetch.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cli/js/web/fetch.ts b/cli/js/web/fetch.ts index 3485a770a..9054465bf 100644 --- a/cli/js/web/fetch.ts +++ b/cli/js/web/fetch.ts @@ -505,6 +505,8 @@ export async function fetch( contentType = "text/plain;charset=UTF-8"; } else if (isTypedArray(init.body)) { body = init.body; + } else if (init.body instanceof ArrayBuffer) { + body = new Uint8Array(init.body); } else if (init.body instanceof URLSearchParams) { body = new TextEncoder().encode(init.body.toString()); contentType = "application/x-www-form-urlencoded;charset=UTF-8"; |