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:
@@ -17,6 +17,7 @@ func main() {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
res.Header().Add("Content-Type", "application/json")
|
||||
if err := json.NewEncoder(res).Encode(map[string]string{
|
||||
"message": fmt.Sprintf("Hello %s! (request n°%d)", params["name"], no),
|
||||
}); err != nil {
|
||||
|
||||
Binary file not shown.
@@ -15,6 +15,7 @@ func main() {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
res.Header().Add("Content-Type", "application/json")
|
||||
if err := json.NewEncoder(res).Encode(map[string]string{
|
||||
"message": fmt.Sprintf("Hello %s!", params["name"]),
|
||||
}); err != nil {
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user