1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-17 18:07:01 +00:00

add a note on http-errors example about #1389

Former-commit-id: 73485e195bc246e8b81a1be3156b361e92c054c7
This commit is contained in:
Gerasimos (Makis) Maropoulos
2019-10-31 06:37:35 +02:00
parent 40ca05dbbf
commit 303f9d3d69
2 changed files with 5 additions and 2 deletions

View File

@@ -27,6 +27,7 @@ func main() {
ctx.Writef("Hello %s", ctx.Params().Get("firstname"))
})
// Read more at: https://github.com/kataras/iris/issues/1335
app.Get("/product-problem", problemExample)
app.Get("/product-error", func(ctx iris.Context) {
@@ -89,10 +90,12 @@ func problemExample(ctx iris.Context) {
},
// OR
// Render as XML:
//
// RenderXML: true,
// XML: iris.XML{Indent: " "},
// and ctx.StatusCode(200) to see the result on browser as a user.
//
// Sets the "Retry-After" response header.
// The below `RetryAfter` field sets the "Retry-After" response header.
//
// Can accept:
// time.Time for HTTP-Date,