wasa-test/service/api/get-hello-world.go

13 lines
353 B
Go
Raw Normal View History

2024-10-01 23:55:57 +02:00
package api
import (
"github.com/julienschmidt/httprouter"
"net/http"
)
// getHelloWorld is an example of HTTP endpoint that returns "Hello world!" as a plain text
func (rt *_router) getHelloWorld(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
w.Header().Set("content-type", "text/plain")
_, _ = w.Write([]byte("Hello World!"))
}