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")) 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-problem", problemExample)
app.Get("/product-error", func(ctx iris.Context) { app.Get("/product-error", func(ctx iris.Context) {
@ -89,10 +90,12 @@ func problemExample(ctx iris.Context) {
}, },
// OR // OR
// Render as XML: // Render as XML:
//
// RenderXML: true, // RenderXML: true,
// XML: iris.XML{Indent: " "}, // 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: // Can accept:
// time.Time for HTTP-Date, // time.Time for HTTP-Date,

2
doc.go
View File

@ -38,7 +38,7 @@ Source code and other details for the project are available at GitHub:
Current Version Current Version
12.0.0 12.0.1
Installation Installation