Class CorsException

  • All Implemented Interfaces:
    java.io.Serializable

    public class CorsException
    extends java.lang.Exception
    Process an incoming cross-origin (CORS) requests. Encapsulates the CORS processing logic as specified by the W3C candidate recommendation from 2013-01-29.
    Since:
    2.3.0
    See Also:
    Serialized Form
    • Field Detail

      • ORIGIN_DENIED

        public static final CorsException ORIGIN_DENIED
        CORS origin denied exception.
      • UNSUPPORTED_METHOD

        public static final CorsException UNSUPPORTED_METHOD
        Unsupported HTTP method.
      • UNSUPPORTED_REQUEST_HEADER

        public static final CorsException UNSUPPORTED_REQUEST_HEADER
        Unsupported HTTP request header.
      • INVALID_ACTUAL_REQUEST

        public static final CorsException INVALID_ACTUAL_REQUEST
        Invalid simple / actual request.
      • INVALID_PREFLIGHT_REQUEST

        public static final CorsException INVALID_PREFLIGHT_REQUEST
        Invalid preflight request.
      • MISSING_ACCESS_CONTROL_REQUEST_METHOD_HEADER

        public static final CorsException MISSING_ACCESS_CONTROL_REQUEST_METHOD_HEADER
        Missing Access-Control-Request-Method header.
    • Method Detail

      • getHttpStatusCode

        public int getHttpStatusCode()
        Returns the associated HTTP status code.
        Returns:
        the HTTP status code, zero if not specified