package org.pac4j.core.context;

/**
 * Some HTTP constants.
 * 
 * @author Jerome Leleu
 * @since 1.4.0
 */
public interface HttpConstants {

    int OK = 200;

    /**
     * @since 1.8
     */
    int CREATED = 201;

    int UNAUTHORIZED = 401;

    int FORBIDDEN = 403;

    int TEMP_REDIRECT = 302;

    int DEFAULT_HTTP_PORT = 80;

    int DEFAULT_HTTPS_PORT = 443;

    String SCHEME_HTTP = "http";

    String SCHEME_HTTPS = "https";

    int DEFAULT_CONNECT_TIMEOUT = 500;
    
    int DEFAULT_READ_TIMEOUT = 5000;

    String LOCATION_HEADER = "Location";

    String AUTHORIZATION_HEADER = "Authorization";

    String BASIC_HEADER_PREFIX = "Basic ";

    String DIGEST_HEADER_PREFIX = "Digest ";

    String AUTHENTICATE_HEADER = "WWW-Authenticate";

    String CONTENT_TYPE_HEADER = "Content-Type";

    String UTF8_ENCODING = "UTF-8";

    String HTML_CONTENT_TYPE = "text/html; charset=utf-8";

    String AJAX_HEADER_VALUE = "XMLHttpRequest";

    String AJAX_HEADER_NAME = "X-Requested-With";

    enum HTTP_METHOD { GET, POST, HEAD, TRACE, PUT, DELETE, OPTIONS }
}

package org.pac4j.core.context;

/**
 * Some HTTP constants.
 * 
 * @author Jerome Leleu
 * @since 1.4.0
 */
public interface HttpConstants {

    int OK = 200;

    int CREATED = 201;

    int UNAUTHORIZED = 401;

    int FORBIDDEN = 403;

    int TEMP_REDIRECT = 302;

    int BAD_REQUEST = 400;

    int DEFAULT_HTTP_PORT = 80;

    int DEFAULT_HTTPS_PORT = 443;

    String SCHEME_HTTP = "http";

    String SCHEME_HTTPS = "https";

    int DEFAULT_CONNECT_TIMEOUT = 500;
    
    int DEFAULT_READ_TIMEOUT = 5000;

    String LOCATION_HEADER = "Location";

    String AUTHORIZATION_HEADER = "Authorization";

    String BASIC_HEADER_PREFIX = "Basic ";

    String DIGEST_HEADER_PREFIX = "Digest ";

    String AUTHENTICATE_HEADER = "WWW-Authenticate";

    String CONTENT_TYPE_HEADER = "Content-Type";

    String UTF8_ENCODING = "UTF-8";

    String HTML_CONTENT_TYPE = "text/html; charset=utf-8";

    String AJAX_HEADER_VALUE = "XMLHttpRequest";

    String AJAX_HEADER_NAME = "X-Requested-With";

    enum HTTP_METHOD { GET, POST, HEAD, TRACE, PUT, DELETE, OPTIONS }
}

add HTTP constant 400