Response.error

Creates a response for an HTTP error an automatically generates an HTML page to display it.

  1. Response error(Status status, string[string] headers)
    class Response
    static
    error
    (,
    string[string] headers = defaultHeaders
    )
  2. Response error(uint statusCode, string[string] headers)

Examples

Response.error(404);
Response.error(StatusCodes.methodNotAllowed, ["Allow": "GET"]);

Meta