2022-04-01 15:07:08 +00:00
|
|
|
import { syscall } from "./syscall";
|
|
|
|
|
|
|
|
export async function json(url: RequestInfo, init: RequestInit): Promise<any> {
|
|
|
|
return syscall("fetch.json", url, init);
|
|
|
|
}
|
|
|
|
|
|
|
|
export async function text(
|
|
|
|
url: RequestInfo,
|
2022-04-19 14:54:47 +00:00
|
|
|
init: RequestInit = {}
|
2022-04-01 15:07:08 +00:00
|
|
|
): Promise<string> {
|
|
|
|
return syscall("fetch.text", url, init);
|
|
|
|
}
|