publishing
This commit is contained in:
@@ -6,6 +6,7 @@ window.api = {
|
|||||||
async req(method, path, body) {
|
async req(method, path, body) {
|
||||||
const res = await fetch(path, {
|
const res = await fetch(path, {
|
||||||
method,
|
method,
|
||||||
|
credentials: "same-origin",
|
||||||
headers: body ? { "Content-Type": "application/json" } : undefined,
|
headers: body ? { "Content-Type": "application/json" } : undefined,
|
||||||
body: body ? JSON.stringify(body) : undefined,
|
body: body ? JSON.stringify(body) : undefined,
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user