Class HeaderNames

java.lang.Object
io.helidon.http.HeaderNames

public final class HeaderNames extends Object
Utility class with a list of names of standard HTTP headers and related tooling methods.
  • Field Details

    • ACCEPT

      public static final HeaderName ACCEPT
      The Accept header name. Content-Types that are acceptedTypes for the response.
    • ACCEPT_CHARSET

      public static final HeaderName ACCEPT_CHARSET
      The Accept-Charset header name. Character sets that are acceptedTypes.
    • ACCEPT_ENCODING

      public static final HeaderName ACCEPT_ENCODING
      The Accept-Encoding header name. List of acceptedTypes encodings.
    • ACCEPT_LANGUAGE

      public static final HeaderName ACCEPT_LANGUAGE
      The Accept-Language header name. List of acceptedTypes human languages for response.
    • ACCEPT_DATETIME

      public static final HeaderName ACCEPT_DATETIME
      The Accept-Datetime header name. Acceptable version in time.
    • ACCESS_CONTROL_ALLOW_CREDENTIALS

      public static final HeaderName ACCESS_CONTROL_ALLOW_CREDENTIALS
      The Access-Control-Allow-Credentials header name. CORS configuration.
    • ACCESS_CONTROL_ALLOW_HEADERS

      public static final HeaderName ACCESS_CONTROL_ALLOW_HEADERS
      The Access-Control-Allow-Headers header name. CORS configuration
    • ACCESS_CONTROL_ALLOW_METHODS

      public static final HeaderName ACCESS_CONTROL_ALLOW_METHODS
      The Access-Control-Allow-Methods header name. CORS configuration
    • ACCESS_CONTROL_ALLOW_ORIGIN

      public static final HeaderName ACCESS_CONTROL_ALLOW_ORIGIN
      The Access-Control-Allow-Origin header name. CORS configuration.
    • ACCESS_CONTROL_EXPOSE_HEADERS

      public static final HeaderName ACCESS_CONTROL_EXPOSE_HEADERS
      The Access-Control-Expose-Headers header name. CORS configuration.
    • ACCESS_CONTROL_MAX_AGE

      public static final HeaderName ACCESS_CONTROL_MAX_AGE
      The Access-Control-Max-Age header name. CORS configuration.
    • ACCESS_CONTROL_REQUEST_HEADERS

      public static final HeaderName ACCESS_CONTROL_REQUEST_HEADERS
      The Access-Control-Request-Headers header name. CORS configuration.
    • ACCESS_CONTROL_REQUEST_METHOD

      public static final HeaderName ACCESS_CONTROL_REQUEST_METHOD
      The Access-Control-Request-Method header name. CORS configuration.
    • AUTHORIZATION

      public static final HeaderName AUTHORIZATION
      The Authorization header name. Authentication credentials for HTTP authentication.
    • EXPECT

      public static final HeaderName EXPECT
      The Expect header name. Indicates that particular server behaviors are required by the client.
    • FORWARDED

      public static final HeaderName FORWARDED
      The Forwarded header name. Disclose original information of a client connecting to a web server through an HTTP proxy.
    • FROM

      public static final HeaderName FROM
      The From header name. The email address of the user making the request.
    • HOST

      public static final HeaderName HOST
      The Host header name. The domain name of the server (for virtual hosting), and the TCP port number on which the server is listening. The port number may be omitted if the port is the standard port for the service requested.
    • HOST_STRING

      public static final String HOST_STRING
      The "Host" header.
      See Also:
    • IF_MATCH

      public static final HeaderName IF_MATCH
      The If-Match header name. Only perform the action if the client supplied entity matches the same entity on the server. This is mainly for methods like PUT to only update a resource if it has not been modified since the user last updated it.
    • IF_MODIFIED_SINCE

      public static final HeaderName IF_MODIFIED_SINCE
      The If-Modified-Since header name. Allows a 304 Not Modified to be returned if content is unchanged.
    • IF_NONE_MATCH

      public static final HeaderName IF_NONE_MATCH
      The If-None-Match header name. Allows a 304 Not Modified to be returned if content is unchanged, based on ETAG.
    • IF_RANGE

      public static final HeaderName IF_RANGE
      The If-Range header name. If the entity is unchanged, send me the part(s) that I am missing; otherwise, send me the entire new entity.
    • IF_UNMODIFIED_SINCE

      public static final HeaderName IF_UNMODIFIED_SINCE
      The If-Unmodified-Since header name. Only send The response if The Entity has not been modified since a specific time.
    • MAX_FORWARDS

      public static final HeaderName MAX_FORWARDS
      The Max-Forwards header name. Limit the number of times the message can be forwarded through proxies or gateways.
    • ORIGIN

      public static final HeaderName ORIGIN
      The <code>{@value}</code> header name. Initiates a request for cross-origin resource sharing (asks server for an 'Access-Control-Allow-Origin' response field).
    • PROXY_AUTHENTICATE

      public static final HeaderName PROXY_AUTHENTICATE
      The Proxy-Authenticate header name. Proxy authentication information.
    • PROXY_AUTHORIZATION

      public static final HeaderName PROXY_AUTHORIZATION
      The Proxy-Authorization header name. Proxy authorization information.
    • RANGE

      public static final HeaderName RANGE
      The Range header name. Request only part of an entity. Bytes are numbered from 0.
    • REFERER

      public static final HeaderName REFERER
      The <code>{@value}</code> header name. This is the address of the previous web page from which a link to the currently requested page was followed. (The word <i>referrer</i> has been misspelled in The RFC as well as in most implementations to the point that it has become standard usage and is considered correct terminology.)
    • REFRESH

      public static final HeaderName REFRESH
      The <code>{@value}</code> header name.
    • TE

      public static final HeaderName TE
      The <code>{@value}</code> header name. The transfer encodings the user agent is willing to acceptedTypes: the same values as for The Response header field Transfer-Encoding can be used, plus the trailers value (related to the chunked transfer method) to notify the server it expects to receive additional fields in the trailer after the last, zero-sized, chunk.
    • USER_AGENT

      public static final HeaderName USER_AGENT
      The User-Agent header name. The user agent string of the user agent.
    • VIA

      public static final HeaderName VIA
      The Via header name. Informs the server of proxies through which the request was sent.
    • ACCEPT_PATCH

      public static final HeaderName ACCEPT_PATCH
      The Accept-Patch header name. Specifies which patch document formats this server supports.
    • ACCEPT_RANGES

      public static final HeaderName ACCEPT_RANGES
      The Accept-Ranges header name. What partial content range types this server supports via byte serving.
    • AGE

      public static final HeaderName AGE
      The Age header name. The age The Object has been in a proxy cache in seconds.
    • ALLOW

      public static final HeaderName ALLOW
      The Allow header name. Valid actions for a specified resource. To be used for a 405 Method not allowed.
    • ALT_SVC

      public static final HeaderName ALT_SVC
      The <code>{@value}</code> header name. A server uses Alt-Svc header (meaning Alternative Services) to indicate that its resources can also be accessed at a different network location (host or port) or using a different protocol.
    • CACHE_CONTROL

      public static final HeaderName CACHE_CONTROL
      The Cache-Control header name. Tells all caching mechanisms from server to client whether they may cache this object. It is measured in seconds.
    • CONNECTION

      public static final HeaderName CONNECTION
      The Connection header name. Control options for The current connection and list of hop-by-hop response fields.
    • CONTENT_DISPOSITION

      public static final HeaderName CONTENT_DISPOSITION
      The <code>{@value}</code> header name. An opportunity to raise a File Download dialogue box for a known MIME type with binary format or suggest a filename for dynamic content. Quotes are necessary with special characters.
    • CONTENT_ENCODING

      public static final HeaderName CONTENT_ENCODING
      The Content-Encoding header name. The type of encoding used on the data.
    • CONTENT_LANGUAGE

      public static final HeaderName CONTENT_LANGUAGE
      The Content-Language header name. The natural language or languages of the intended audience for the enclosed content.
    • CONTENT_LENGTH

      public static final HeaderName CONTENT_LENGTH
      The Content-Length header name. The length of the response body in octets.
    • CONTENT_LOCATION

      public static final HeaderName CONTENT_LOCATION
      The Content-Location header name. An alternate location for the returned data.
    • CONTENT_RANGE

      public static final HeaderName CONTENT_RANGE
      The Content-Range header name. Where in a full body message this partial message belongs.
    • CONTENT_TYPE

      public static final HeaderName CONTENT_TYPE
      The Content-Type header name. The MIME type of this content.
    • DATE

      public static final HeaderName DATE
      The Date header name. The date and time that the message was sent (in HTTP-date format as defined by RFC 7231).
    • ETAG

      public static final HeaderName ETAG
      The Etag header name. An identifier for a specific version of a resource, often a message digest.
    • EXPIRES

      public static final HeaderName EXPIRES
      The Expires header name. Gives the date/time after which the response is considered stale (in HTTP-date format as defined by RFC 7231)
    • LAST_MODIFIED

      public static final HeaderName LAST_MODIFIED
      The Last-Modified header name. The last modified date for the requested object (in HTTP-date format as defined by RFC 7231)
    • LOCATION

      public static final HeaderName LOCATION
      The Location header name. Used in redirection, or whenRequest a new resource has been created.
    • PRAGMA

      public static final HeaderName PRAGMA
      The Pragma header name. Implementation-specific fields that may have various effects anywhere along the request-response chain.
    • PUBLIC_KEY_PINS

      public static final HeaderName PUBLIC_KEY_PINS
      The Public-Key-Pins header name. HTTP Public Key Pinning, announces hash of website's authentic TLS certificate.
    • RETRY_AFTER

      public static final HeaderName RETRY_AFTER
      The <code>{@value}</code> header name. If an entity is temporarily unavailable, this instructs the client to try again later. Value could be a specified period of time (in seconds) or an HTTP-date.
    • SERVER

      public static final HeaderName SERVER
      The Server header name. A name for the server.
    • SET_COOKIE2

      public static final HeaderName SET_COOKIE2
      The Set-Cookie2 header name. An HTTP cookie set directive.
    • STRICT_TRANSPORT_SECURITY

      public static final HeaderName STRICT_TRANSPORT_SECURITY
      The Strict-Transport-Security header name. A HSTS Policy informing The HTTP client how long to cache the HTTPS only policy and whether this applies to subdomains.
    • TRAILER

      public static final HeaderName TRAILER
      The Trailer header name. The Trailer general field value indicates that the given set of} header fields is present in the trailer of a message encoded with chunked transfer coding.
    • TRANSFER_ENCODING

      public static final HeaderName TRANSFER_ENCODING
      The Transfer-Encoding header name. The form of encoding used to safely transfer the entity to the user. Currently defined methods are: chunked, compress, deflate, gzip, identity.
    • TSV

      public static final HeaderName TSV
      The Tsv header name. Tracking Status Value, value suggested to be sent in response to a DNT(do-not-track).
    • UPGRADE

      public static final HeaderName UPGRADE
      The Upgrade header name. Ask to upgrade to another protocol.
    • VARY

      public static final HeaderName VARY
      The Vary header name. Tells downstream proxies how to match future request headers to decide whether the cached response can be used rather than requesting a fresh one from the origin server.
    • WARNING

      public static final HeaderName WARNING
      The Warning header name. A general warning about possible problems with the entity body.
    • WWW_AUTHENTICATE

      public static final HeaderName WWW_AUTHENTICATE
      The WWW-Authenticate header name. Indicates the authentication scheme that should be used to access the requested entity.
    • X_HELIDON_CN

      public static final HeaderName X_HELIDON_CN
      The X_HELIDON_CN header name. Corresponds to the certificate CN subject value when client authentication enabled. This header will be removed if it is part of the request.
    • X_FORWARDED_FOR

      public static final HeaderName X_FORWARDED_FOR
      The X-Forwarded-For header name. Represents the originating client and intervening proxies when the request has passed through one or more proxies.
    • X_FORWARDED_HOST

      public static final HeaderName X_FORWARDED_HOST
      The X_FORWARDED_HOST header name. Represents the host specified by the originating client when the request has passed through one or more proxies.
    • X_FORWARDED_PORT

      public static final HeaderName X_FORWARDED_PORT
      The X_FORWARDED_PORT header name. Represents the port specified by the originating client when the request has passed through one or more proxies.
    • X_FORWARDED_PREFIX

      public static final HeaderName X_FORWARDED_PREFIX
      The X_FORWARDED_PREFIX header name. Represents the path prefix to be applied to relative paths resolved against this request when the request has passed through one or more proxies.
    • X_FORWARDED_PROTO

      public static final HeaderName X_FORWARDED_PROTO
      The X_FORWARDED_PROTO header name. Represents the protocol specified by the originating client when the request has passed through one or more proxies.
  • Method Details

    • create

      public static HeaderName create(String name)
      Find or create a header name. If a known indexed header exists for the name, the instance is returned. Otherwise a new header name is created with the provided name.
      Parameters:
      name - default case to use for custom header names (header names not known by Helidon)
      Returns:
      header name instance
    • create

      public static HeaderName create(String lowerCase, String defaultCase)
      Find or create a header name. If a known indexed header exists for the lower case name, the instance is returned. Otherwise a new header name is created with the provided names.
      Parameters:
      lowerCase - lower case name
      defaultCase - default case to use for custom header names (header names not known by Helidon)
      Returns:
      header name instance
    • createFromLowercase

      public static HeaderName createFromLowercase(String lowerCase)
      Create a header name from lower case letters.
      Parameters:
      lowerCase - lower case
      Returns:
      a new header name