MCPcopy Create free account
hub / github.com/kataras/iris / writeHeaders

Method writeHeaders

_examples/database/mongodb/httputil/error.go:79–82  ·  view source on GitHub ↗
(ctx iris.Context)

Source from the content-addressed store, hash-verified

77}
78
79func (err HTTPError) writeHeaders(ctx iris.Context) {
80 ctx.StatusCode(err.StatusCode)
81 ctx.Header("X-Content-Type-Options", "nosniff")
82}
83
84// LogFailure will print out the failure to the "logger".
85func LogFailure(logger io.Writer, ctx iris.Context, err HTTPError) {

Callers 2

FailFunction · 0.80
FailJSONFunction · 0.80

Calls 2

StatusCodeMethod · 0.65
HeaderMethod · 0.45

Tested by

no test coverage detected