Http Status¶
Import: import system.webapi;
For behavior and native target requirements, see Native Web APIs.
HttpStatus¶
HTTP status used as a handler/dependency short-circuit (Result<T, HttpStatus>).
code¶
HTTP status code.
message¶
Human-readable explanation of the result or failure.
constructor¶
Creates a HttpStatus with code, message.
bad_request¶
Creates a 400 Bad Request status.
unauthorized¶
Creates a 401 Unauthorized status.
forbidden¶
Creates a 403 Forbidden status.
not_found¶
Creates a 404 Not Found response.
conflict¶
Creates a 409 Conflict status.
unprocessable¶
Creates a 422 Unprocessable Entity status.
too_many¶
Creates a 429 Too Many Requests status.
internal¶
Creates a 500 Internal Server Error status.