summaryrefslogtreecommitdiff
path: root/js/fetch.ts
diff options
context:
space:
mode:
authorKurt Mackey <mrkurt@gmail.com>2019-05-31 14:00:37 -0700
committerRyan Dahl <ry@tinyclouds.org>2019-05-31 17:00:37 -0400
commit652be19041246d762ac5a1fa0b7fcddecb1ffd5d (patch)
tree1d65644ae7c94b5f4801f4089feb36db948f3e6a /js/fetch.ts
parent8fb44eba5bb9862de5fcc6c785eb6f21ecbd0aea (diff)
use body when Request instance is passed to fetch (fixes #2433) (#2435)
Diffstat (limited to 'js/fetch.ts')
-rw-r--r--js/fetch.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/js/fetch.ts b/js/fetch.ts
index a28a81535..7cbaf7f10 100644
--- a/js/fetch.ts
+++ b/js/fetch.ts
@@ -403,6 +403,11 @@ export async function fetch(
url = input.url;
method = input.method;
headers = input.headers;
+
+ //@ts-ignore
+ if (input._bodySource) {
+ body = new DataView(await input.arrayBuffer());
+ }
}
// Send Fetch message