1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 10:27:06 +00:00
Former-commit-id: 292d155c877ba3f9d1210db54c3df3fedd1d0c1c
This commit is contained in:
Gerasimos (Makis) Maropoulos
2018-01-15 00:54:01 +02:00
parent ad9c76adb3
commit a19e570c8a
19 changed files with 154 additions and 47 deletions

View File

@@ -119,6 +119,12 @@ func newApp() *iris.Application {
ctx.Write(b)
})
app.HandleMany("POST PUT", "/postvalue", func(ctx iris.Context) {
name := ctx.PostValueDefault("name", "iris")
headervale := ctx.GetHeader("headername")
ctx.Writef("Hello %s | %s", name, headervale)
})
return app
}
@@ -152,11 +158,13 @@ func main() {
http://mysubdomain.localhost:8080/
// PUT
http://localhost:8080/postvalue
http://localhost:8080/games/42/players/93
http://localhost:8080/games/42/clans/clan/93
// POST
http://localhost:8080/
http://localhost:8080/postvalue
http://localhost:8080/games/42/clans
http://localhost:8080/games/42/players
http://localhost:8080/games/42/clans/93/leave