Rebranded plugbox to PlugOS (plugos)

This commit is contained in:
Zef Hemel
2022-03-27 11:31:12 +02:00
parent 621e55dbcf
commit cb809d2d03
45 changed files with 42 additions and 51 deletions
+15
View File
@@ -0,0 +1,15 @@
import fetch, { RequestInfo, RequestInit } from "node-fetch";
import { SysCallMapping } from "../system";
export function fetchSyscalls(): SysCallMapping {
return {
async json(ctx, url: RequestInfo, init: RequestInit) {
let resp = await fetch(url, init);
return resp.json();
},
async text(ctx, url: RequestInfo, init: RequestInit) {
let resp = await fetch(url, init);
return resp.text();
},
};
}