wasa-test/service/api/get-context-reply.go
2024-10-01 23:55:57 +02:00

14 lines
576 B
Go

package api
import (
"git.sapienzaapps.it/fantasticcoffee/fantastic-coffee-decaffeinated/service/api/reqcontext"
"github.com/julienschmidt/httprouter"
"net/http"
)
// getContextReply is an example of HTTP endpoint that returns "Hello World!" as a plain text. The signature of this
// handler accepts a reqcontext.RequestContext (see httpRouterHandler).
func (rt *_router) getContextReply(w http.ResponseWriter, r *http.Request, ps httprouter.Params, ctx reqcontext.RequestContext) {
w.Header().Set("content-type", "text/plain")
_, _ = w.Write([]byte("Hello World!"))
}