mirror of
https://github.com/nlepage/go-wasm-http-server.git
synced 2025-03-10 17:29:10 +00:00
⚗️
This commit is contained in:
parent
e89ed3ec01
commit
d4aa7472a6
@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<title>go-wasm-http-server demo</title>
|
||||
<script>
|
||||
function hello() {
|
||||
async function hello() {
|
||||
res=await fetch('api/hello', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
@ -11,6 +11,8 @@
|
||||
},
|
||||
body: JSON.stringify({ name: document.querySelector("#name").value })
|
||||
})
|
||||
const { message } = await res.json()
|
||||
alert(message)
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
Loading…
x
Reference in New Issue
Block a user