1
export async function main(url: string, body: object = {}) {
2
const resp = await fetch(url, {
3
method: "PUT",
4
headers: {
5
"Content-Type": "application/json",
6
},
7
body: JSON.stringify(body),
8
});
9
10
return {
11
ok: resp.ok,
12
status: resp.status,
13
text: await resp.text(),
14
};
15
}
16
export async function main(url: string, body: object) {
let resp = await fetch(url, {
body,
return { "response": await resp.text() }