export async function main(url: string, body: object = {}) {
const resp = await fetch(url, {
method: "PUT",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(body),
});
return {
ok: resp.ok,
status: resp.status,
text: await resp.text(),
};
}
Submitted by admin 469 days ago
export async function main(url: string, body: object = {}) {
const resp = await fetch(url, {
method: "PUT",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(body),
});
return {
ok: resp.ok,
status: resp.status,
text: await resp.text(),
};
}
Submitted by jaller94 837 days ago