mirror of
https://github.com/kataras/iris.git
synced 2025-02-02 07:20:35 +01:00
add a note on http-errors example about #1389
Former-commit-id: 73485e195bc246e8b81a1be3156b361e92c054c7
This commit is contained in:
parent
40ca05dbbf
commit
303f9d3d69
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue
Block a user