mirror of
https://github.com/nlepage/go-wasm-http-server.git
synced 2026-01-12 01:59:14 +00:00
⚗️
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user