1
0

Deleted fetch syscall (now natively supported)

This commit is contained in:
Zef Hemel
2022-04-21 15:29:13 +02:00
parent dad2b4e835
commit a2cb2727d2
5 changed files with 8 additions and 39 deletions
-15
View File
@@ -1,15 +0,0 @@
import fetch, { RequestInfo, RequestInit } from "node-fetch";
import { SysCallMapping } from "../system";
export function fetchSyscalls(): SysCallMapping {
return {
"fetch.json": async (ctx, url: RequestInfo, init: RequestInit) => {
let resp = await fetch(url, init);
return resp.json();
},
"fetch.text": async (ctx, url: RequestInfo, init: RequestInit) => {
let resp = await fetch(url, init);
return resp.text();
},
};
}