Class MethodNotAllowed

  • All Implemented Interfaces:
    Serializable

    public class MethodNotAllowed
    extends HttpError
    HTTP Status Code for Method Not Allowed To send this in the response, either pass an instance (with optional custom message) to Request.send(HttpError) or throw it out of an Irked controller handler. To throw this response out of a functional interface implementation (lambda) that does not declare throwing HttpError, use the HttpError.unchecked() method.
    See Also:
    Serialized Form
    • Field Detail

      • code

        public static final int code
        HTTP status code for 'Method Not Allowed'
        See Also:
        Constant Field Values
    • Constructor Detail

      • MethodNotAllowed

        public MethodNotAllowed()
        Create a 'Method Not Allowed' HTTP Response.
      • MethodNotAllowed

        public MethodNotAllowed​(Throwable t)
        Create a 'Method Not Allowed' HTTP Response with an underlying cause.
        Parameters:
        t - underlying cause
      • MethodNotAllowed

        public MethodNotAllowed​(String m)
        Create a 'Method Not Allowed' HTTP Response with a custom message in the body.
        Parameters:
        m - custom response message
      • MethodNotAllowed

        public MethodNotAllowed​(String m,
                                Throwable t)
        Create a 'Method Not Allowed' HTTP Response with a custom message in the body and an underlying cause.
        Parameters:
        m - custom response message
        t - underlying cause