All Downloads are FREE. Search and download functionalities are using the official Maven repository.

httpserver.core.Headers Maven / Gradle / Ivy

package httpserver.core;

import static httpserver.util.Functions.isNullOrEmpty;

public enum Headers {;

    public static final String
        AUTHORIZATION = "Authorization",
        CACHE_CONTROL = "Cache-Control",
        CONNECTION = "Connection",
        CONTENT_LENGTH = "Content-Length",
        CONTENT_TYPE = "Content-Type",
        COOKIE = "Cookie",
        CROSS_ORIGIN_OPENER_POLICY = "Cross-Origin-Opener-Policy",
        STRICT_TRANSPORT_SECURITY = "Strict-Transport-Security",
        X_FRAME_OPTIONS = "X-Frame-Options",
        X_XSS_PROTECTION = "X-XSS-Protection",
        X_CONTENT_TYPE_OPTIONS = "X-Content-Type-Options",
        REFERRER_POLICY = "Referrer-Policy",
        DATE = "Date",
        ETAG = "ETag",
        EXPIRES = "Expires",
        EXPECT = "Expect",
        HOST = "Host",
        IF_NONE_MATCH = "If-None-Match",
        LOCATION = "Location",
        SET_COOKIE = "Set-Cookie",
        USER_AGENT = "User-Agent",
        WWW_AUTHENTICATE = "WWW-Authenticate",
        ACCEPT_ENCODING = "Accept-Encoding",
        CONTENT_ENCODING = "Content-Encoding";

    public static boolean isContentHeader(final String header) {
        return !isNullOrEmpty(header) && header.startsWith("Content-");
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy