1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-10 13:35:59 +00:00

HandleHTTPError MVC Method as requested at #1595. Read HISTORY.md

example at: https://github.com/kataras/iris/tree/master/_examples/mvc/error-handler-http
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-08-22 08:04:22 +03:00
parent a018ba9b0a
commit 8e049d77c9
15 changed files with 186 additions and 16 deletions

View File

@@ -84,6 +84,10 @@ var BuiltinDependencies = []*Dependency{
NewDependency(func(ctx *context.Context) net.IP {
return net.ParseIP(ctx.RemoteAddr())
}).Explicitly(),
// Status Code (special type for MVC HTTP Error handler to not conflict with path parameters)
NewDependency(func(ctx *context.Context) Code {
return Code(ctx.GetStatusCode())
}).Explicitly(),
// payload and param bindings are dynamically allocated and declared at the end of the `binding` source file.
}