mirror of
https://github.com/kataras/iris.git
synced 2025-12-18 10:27:06 +00:00
Update to version 10.0.1 - read more at: https://github.com/kataras/iris/blob/master/HISTORY.md#mo-15-jenuary-2018--v1001
Former-commit-id: 292d155c877ba3f9d1210db54c3df3fedd1d0c1c
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user