From d3c58da4bf914cbdcf0c53eeb4cb6cc296e40887 Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Sun, 8 Jan 2023 21:01:48 +0100 Subject: [PATCH] Added "body" support to fetch --- plug-api/plugos-syscall/fetch.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plug-api/plugos-syscall/fetch.ts b/plug-api/plugos-syscall/fetch.ts index 2428a57..82d07c0 100644 --- a/plug-api/plugos-syscall/fetch.ts +++ b/plug-api/plugos-syscall/fetch.ts @@ -3,6 +3,7 @@ import { base64Decode } from "../../plugos/asset_bundle/base64.ts"; export type SandboxFetchRequest = { method?: string; headers?: Record; + body?: string; }; export type SandboxFetchResponse = { @@ -32,6 +33,7 @@ export function monkeyPatchFetch() { init && { method: init.method, headers: init.headers as Record, + body: init.body as string, }, ); return new Response(base64Decode(r.base64Body), {