mirror of
https://github.com/kataras/iris.git
synced 2025-12-19 02:47:04 +00:00
add a simple URLParamSlice
I would love to change the current URLParams() to URLParams(name string) []string to match the PostValues(name string) []string, error but that would be a big breaking changes to many servers... so stick with it.
This commit is contained in:
@@ -25,6 +25,12 @@ func main() {
|
||||
ctx.Writef("MyType: %#v", t)
|
||||
})
|
||||
|
||||
app.Get("/simple", func(ctx iris.Context) {
|
||||
names := ctx.URLParamSlice("name")
|
||||
ctx.Writef("names: %v", ids)
|
||||
})
|
||||
|
||||
// http://localhost:8080?name=iris&age=3
|
||||
// http://localhost:8080/simple?name=john&name=doe&name=kataras
|
||||
app.Listen(":8080")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user