Query 和 PostForm
Query
app.Get("/hello", func(ctx *erguotou.Context) {
val := ctx.GetVal("hello")
ctx.Write(200,val)
})
PostForm
app.Post("/hello", func(ctx *erguotou.Context) {
val := ctx.PostVal("hello")
ctx.Write(200,val)
})
Body中的内容
app.Post("/hello", func(ctx *erguotou.Context) {
body := ctx.Body()
ctx.Write(200,body)
})