This commit is contained in:
Nicolas Lepage
2021-01-24 21:18:18 +01:00
parent 37bf64f9dc
commit 32e6c6349c
8 changed files with 54 additions and 69 deletions

View File

@@ -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.

View File

@@ -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.