mirror of
https://github.com/nlepage/go-wasm-http-server.git
synced 2025-03-10 17:29:10 +00:00
⏪ Revert "⚗️ Try w/o using jsdelivr"
This reverts commit 2a84a402ce54760604057daa53ca991d43fda347.
This commit is contained in:
parent
a6785f45f9
commit
a9981520e5
@ -2,16 +2,15 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>go-wasm-http-server demo</title>
|
<title>go-wasm-http-server demo</title>
|
||||||
<script src="https://raw.githubusercontent.com/nlepage/go-wasm-http-server/master/index.js"></script>
|
<script src="https://cdn.jsdelivr.net/gh/nlepage/go-wasm-http-server@254bd5e2ea5b84b4ed2918f8edc7981fb24b06ad/index.js"></script>
|
||||||
<script>
|
<script>
|
||||||
async function hello() {
|
async function hello() {
|
||||||
const name = document.querySelector("#name").value
|
res = await fetch('api/hello', {
|
||||||
const res = await fetch('api/hello', {
|
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
},
|
},
|
||||||
body: JSON.stringify({ name })
|
body: JSON.stringify({ name: document.querySelector("#name").value })
|
||||||
})
|
})
|
||||||
const { message } = await res.json()
|
const { message } = await res.json()
|
||||||
alert(message)
|
alert(message)
|
||||||
|
@ -1 +1 @@
|
|||||||
importScripts('https://raw.githubusercontent.com/nlepage/go-wasm-http-server/master/sw.js')
|
importScripts('https://cdn.jsdelivr.net/gh/nlepage/go-wasm-http-server@254bd5e2ea5b84b4ed2918f8edc7981fb24b06ad/sw.js')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user