mirror of
https://github.com/kataras/iris.git
synced 2026-01-04 02:37:14 +00:00
add my new trie data structure implementation written from scratch and specifically designed for HTTP (and Iris) - see https://github.com/kataras/muxie for the net/http version of it
Former-commit-id: 4eed1585f29b57418b61f6de058f5d6db4bb98bf
This commit is contained in:
@@ -104,7 +104,7 @@ Structuring depends on your own needs. We can't tell you how to design your own
|
||||
|
||||
### Routing, Grouping, Dynamic Path Parameters, "Macros" and Custom Context
|
||||
|
||||
* `app.Get("{userid:number min(1)}", myHandler)`
|
||||
* `app.Get("{userid:int min(1)}", myHandler)`
|
||||
* `app.Post("{asset:path}", myHandler)`
|
||||
* `app.Put("{custom:string regexp([a-z]+)}", myHandler)`
|
||||
|
||||
@@ -128,10 +128,10 @@ app.Get("/profile/me", userHandler)
|
||||
|
||||
// Matches all GET requests prefixed with /users/
|
||||
// and followed by a number which should be equal or bigger than 1
|
||||
app.Get("/user/{userid:number min(1)}", getUserHandler)
|
||||
app.Get("/user/{userid:int min(1)}", getUserHandler)
|
||||
// Matches all requests DELETE prefixed with /users/
|
||||
// and following by a number which should be equal or bigger than 1
|
||||
app.Delete("/user/{userid:number min(1)}", deleteUserHandler)
|
||||
app.Delete("/user/{userid:int min(1)}", deleteUserHandler)
|
||||
|
||||
// Matches all GET requests except "/", "/about", anything starts with "/assets/" etc...
|
||||
// because it does not conflict with the rest of the routes.
|
||||
@@ -149,7 +149,6 @@ Navigate through examples for a better understanding.
|
||||
- [Write your own custom parameter types](routing/macros/main.go) **NEW**
|
||||
- [Reverse routing](routing/reverse/main.go)
|
||||
- [Custom Router (high-level)](routing/custom-high-level-router/main.go) **NEW**
|
||||
- [Custom Router (low-level)](routing/custom-low-level-router/main.go) **NEW**
|
||||
- [Custom Wrapper](routing/custom-wrapper/main.go)
|
||||
- Custom Context
|
||||
* [method overriding](routing/custom-context/method-overriding/main.go)
|
||||
|
||||
Reference in New Issue
Block a user