1
0
mirror of https://github.com/actix/actix-website synced 2025-06-27 15:39:02 +02:00

prettier js/html

This commit is contained in:
Rob Ede
2023-11-01 15:32:44 +00:00
parent 0d0e7f4433
commit ee701e0e23
10 changed files with 122 additions and 117 deletions

View File

@ -1,7 +1,7 @@
<!doctype htmtl>
<!DOCTYPE htmtl>
<html>
<head>
<meta charset=utf-8>
<meta charset="utf-8" />
<title>Forms</title>
</head>
@ -14,17 +14,17 @@
let payload = {
timestamp: 12345,
kind: "this is a kind",
tags: ['tag1', 'tag2', 'tag3'],
}
tags: ["tag1", "tag2", "tag3"],
};
function submitJson() {
fetch('http://localhost:8080/event', {
method: 'POST',
fetch("http://localhost:8080/event", {
method: "POST",
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
Accept: "application/json",
"Content-Type": "application/json",
},
body: JSON.stringify(payload)
body: JSON.stringify(payload),
})
.then(function (res) {
return res.json();
@ -32,7 +32,7 @@
.then(function (data) {
let expected = {
...payload,
id: 1
id: 1,
};
console.log("expected: ", expected);
console.log("received: ", data);