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

Source

const Int code

The HTTP status code.

@see HttpResponse.statusMsg

data

Source

const Obj? data

Custom user data

make

Source

new make(Int statusCode, Str? statusMsg := ..., Obj? data := null)

makeErr

Source

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

Source

const Str msg

The HTTP status message.

@see HttpResponse.statusMsg

toErr

Source

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

Source

virtual override Str toStr()

Returns ${code} - ${msg}