Compare commits
No commits in common. "5104dd8e2d6bca2f1a09e21829318aa30d71cd64" and "8b6d38768b547f0acc0b81cc34b73a1f4f2907cc" have entirely different histories.
5104dd8e2d
...
8b6d38768b
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +0,0 @@
|
||||
.DS_Store
|
Binary file not shown.
Before Width: | Height: | Size: 6.2 KiB |
@ -1,52 +0,0 @@
|
||||
async function getJson(url,headers={}) {
|
||||
try {
|
||||
const response = await fetch(url);
|
||||
return await response.json();
|
||||
} catch {
|
||||
return ({
|
||||
status: 0,
|
||||
body: {}
|
||||
});
|
||||
}
|
||||
}
|
||||
async function getText(url, headers={}) {
|
||||
try {
|
||||
const response = await fetch(url);
|
||||
return ({
|
||||
status: response.status,
|
||||
body: await response.text()
|
||||
});
|
||||
} catch {
|
||||
return ({
|
||||
status: 0,
|
||||
body: ""
|
||||
});
|
||||
}
|
||||
}
|
||||
async function postJson(url,data = {},headers={}) {
|
||||
try {
|
||||
headers["content-type"] = "application/json";
|
||||
const response = await fetch(url,{method: "post", headers: headers,body: JSON.stringify(data)});
|
||||
return await response.json();
|
||||
} catch {
|
||||
return ({
|
||||
status: 0,
|
||||
body: {}
|
||||
});
|
||||
}
|
||||
}
|
||||
async function postText(url,data = {},headers={}) {
|
||||
try {
|
||||
headers["content-type"] = "application/json";
|
||||
const response = await fetch(url,{method: "post", headers: headers,body: JSON.stringify(data)});
|
||||
return ({
|
||||
status: response.status,
|
||||
body: await response.text()
|
||||
});
|
||||
} catch {
|
||||
return ({
|
||||
status: 0,
|
||||
body: ""
|
||||
});
|
||||
}
|
||||
}
|
@ -2,15 +2,6 @@
|
||||
<html lang="id">
|
||||
<head>
|
||||
<title>Agen Perubahan</title>
|
||||
<script src="/assets/js/app.js"
|
||||
></script>
|
||||
<style>
|
||||
html
|
||||
{
|
||||
background-color: dimgray;
|
||||
color: lightgray;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
Agen Perubahan
|
||||
|
Loading…
x
Reference in New Issue
Block a user