diff options
Diffstat (limited to 'op_crates/fetch')
-rw-r--r-- | op_crates/fetch/26_fetch.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/op_crates/fetch/26_fetch.js b/op_crates/fetch/26_fetch.js index 95ee96812..0835e12a1 100644 --- a/op_crates/fetch/26_fetch.js +++ b/op_crates/fetch/26_fetch.js @@ -1246,8 +1246,12 @@ body = multipartBuilder.getBody(); contentType = multipartBuilder.getContentType(); } else { - // TODO: ReadableStream - throw new Error("Not implemented"); + // TODO(lucacasonato): do this in a streaming fashion once we support it + const buf = new Buffer(); + for await (const chunk of init.body) { + buf.write(chunk); + } + body = buf.bytes(); } if (contentType && !headers.has("content-type")) { headers.set("content-type", contentType); |