const classafBedSheet::HttpStatus
sys::Obj afBedSheet::HttpStatus
(Response Object) - Use to send a generic HTTP Status to the client.
HttpStatus(404, "Page Not Found")
- code
const Int code
The HTTP status code.
- data
const Obj? data
Custom user data
- make
new make(Int statusCode, Str? statusMsg := ..., Obj? data := null)
- makeErr
static ReProcessErr makeErr(Int statusCode, Str? statusMsg := ..., Obj? data := null)
Throw to send a HTTP Status to the client. Use in exceptional cases where it may not be suitable / possible to return a
HttpStatus
instance.throw HttpStatus.makeErr(404, "Page Not Found")
Consider using
toErr()
instead.- msg
const Str msg
The HTTP status message.
- toErr
ReProcessErr toErr()
Convert this status to an Err to be thrown. Use in exceptional cases where it may not be suitable / possible to return a
HttpStatus
instance.throw HttpStatus(404, "Page Not Found").toErr
- toStr
virtual override Str toStr()
Returns
${code} - ${msg}