1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-20 03:17:04 +00:00

update the documents for the new MVC API and some of its new features but not finished yet, README big examples and _examples/mvc/login is are yet updated and I'm thinking of removing the big examples on README.md, they exist on the _examples/mvc updated.

Former-commit-id: c2938d4bcaa3520744526f7975ee3cce632499b3
This commit is contained in:
Gerasimos (Makis) Maropoulos
2017-12-22 10:18:31 +02:00
parent 91ee8287a8
commit ef3a09c126
10 changed files with 420 additions and 461 deletions

View File

@@ -25,25 +25,6 @@ type UsersController struct {
Service services.UserService
}
// This could be possible but we should not call handlers inside the `BeginRequest`.
// Because `BeginRequest` was introduced to set common, shared variables between all method handlers
// before their execution.
// We will add this middleware from our `app.Controller` call.
//
// var authMiddleware = basicauth.New(basicauth.Config{
// Users: map[string]string{
// "admin": "password",
// },
// })
//
// func (c *UsersController) BeginRequest(ctx iris.Context) {
// c.C.BeginRequest(ctx)
//
// if !ctx.Proceed(authMiddleware) {
// ctx.StopExecution()
// }
// }
// Get returns list of the users.
// Demo:
// curl -i -u admin:password http://localhost:8080/users