1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 18:37:05 +00:00
Former-commit-id: c66f17fb0dc5c130e5060bea4cb4f291e031a36c
This commit is contained in:
Gerasimos (Makis) Maropoulos
2019-11-03 00:41:52 +02:00
parent dc9ad50e76
commit 42e752b3f5
4 changed files with 67 additions and 51 deletions

View File

@@ -70,7 +70,7 @@ func main() {
// this will be executed by the MyContext.Context
// if MyContext is not directly define the View function by itself.
app.Handle("GET", "/hi/{firstname:alphabetical}", recordWhichContextJustForProofOfConcept, func(ctx iris.Context) {
firstname := ctx.Params().Get("firstname") // ctx.Values().GetString("firstname")
firstname := ctx.Params().Get("firstname")
ctx.ViewData("firstname", firstname)
ctx.Gzip(true)