mirror of
https://github.com/valyala/fasthttp.git
synced 2026-06-19 16:47:16 +03:00
@@ -1008,6 +1008,8 @@ func addrToIP(addr net.Addr) net.IP {
|
||||
|
||||
// Error sets response status code to the given value and sets response body
|
||||
// to the given message.
|
||||
//
|
||||
// Warning: this will reset the response headers and body already set!
|
||||
func (ctx *RequestCtx) Error(msg string, statusCode int) {
|
||||
ctx.Response.Reset()
|
||||
ctx.SetStatusCode(statusCode)
|
||||
|
||||
Reference in New Issue
Block a user