Class Http.Header

  • Enclosing class:
    Http

    public static final class Http.Header
    extends Object
    Utility class with a list of names of standard HTTP headers and related tooling methods.
    • Field Detail

      • ACCEPT

        public static final String ACCEPT
        The "Accept" header name. Content-Types that are acceptedTypes for the response.
        See Also:
        Constant Field Values
      • ACCEPT_CHARSET

        public static final String ACCEPT_CHARSET
        The "Accept-Charset" header name. Character sets that are acceptedTypes.
        See Also:
        Constant Field Values
      • ACCEPT_ENCODING

        public static final String ACCEPT_ENCODING
        The "Accept-Encoding" header name. List of acceptedTypes encodings.
        See Also:
        Constant Field Values
      • ACCEPT_LANGUAGE

        public static final String ACCEPT_LANGUAGE
        The "Accept-Language" header name. List of acceptedTypes human languages for response.
        See Also:
        Constant Field Values
      • ACCEPT_DATETIME

        public static final String ACCEPT_DATETIME
        The "Accept-Datetime" header name. Acceptable version in time.
        See Also:
        Constant Field Values
      • AUTHORIZATION

        public static final String AUTHORIZATION
        The "Authorization" header name. Authentication credentials for HTTP authentication.
        See Also:
        Constant Field Values
      • EXPECT

        public static final String EXPECT
        The "Expect" header name. Indicates that particular server behaviors are required by the client.
        See Also:
        Constant Field Values
      • FORWARDED

        public static final String FORWARDED
        The "Forwarded" header name. Disclose original information of a client connecting to a web server through an HTTP proxy.
        See Also:
        Constant Field Values
      • FROM

        public static final String FROM
        The "From" header name. The email address of the user making the request.
        See Also:
        Constant Field Values
      • HOST

        public static final String 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.
        See Also:
        Constant Field Values
      • IF_MATCH

        public static final String 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.
        See Also:
        Constant Field Values
      • IF_MODIFIED_SINCE

        public static final String IF_MODIFIED_SINCE
        The "If-Modified-Since" header name. Allows a 304 Not Modified to be returned if content is unchanged.
        See Also:
        Constant Field Values
      • IF_NONE_MATCH

        public static final String IF_NONE_MATCH
        The "If-None-Match" header name. Allows a 304 Not Modified to be returned if content is unchanged, based on ETAG.
        See Also:
        Constant Field Values
      • IF_RANGE

        public static final String 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.
        See Also:
        Constant Field Values
      • IF_UNMODIFIED_SINCE

        public static final String IF_UNMODIFIED_SINCE
        The "If-Unmodified-Since" header name. Only send the response if the entity has not been modified since a specific time.
        See Also:
        Constant Field Values
      • MAX_FORWARDS

        public static final String MAX_FORWARDS
        The "Max-Forwards" header name. Limit the number of times the message can be forwarded through proxies or gateways.
        See Also:
        Constant Field Values
      • ORIGIN

        public static final String ORIGIN
        The "Origin" header name. Initiates a request for cross-origin resource sharing (asks server for an 'Access-Control-Allow-Origin' response field).
        See Also:
        Constant Field Values
      • RANGE

        public static final String RANGE
        The "Range" header name. Request only part of an entity. Bytes are numbered from 0.
        See Also:
        Constant Field Values
      • REFERER

        public static final String REFERER
        The "Referer" header name. This is the address of the previous web page from which a link to the currently requested page was followed. (The word referrer 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.)
        See Also:
        Constant Field Values
      • TE

        public static final String TE
        The "TE" 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.
        See Also:
        Constant Field Values
      • USER_AGENT

        public static final String USER_AGENT
        The "User-Agent" header name. The user agent string of the user agent.
        See Also:
        Constant Field Values
      • VIA

        public static final String VIA
        The "Via" header name. Informs the server of proxies through which the request was sent.
        See Also:
        Constant Field Values
      • ACCEPT_PATCH

        public static final String ACCEPT_PATCH
        The "Accept-Patch" header name. Specifies which patch document formats this server supports.
        See Also:
        Constant Field Values
      • ACCEPT_RANGES

        public static final String ACCEPT_RANGES
        The "Accept-Ranges" header name. What partial content range types this server supports via byte serving.
        See Also:
        Constant Field Values
      • AGE

        public static final String AGE
        The "Age" header name. The age the object has been in a proxy cache in seconds.
        See Also:
        Constant Field Values
      • ALLOW

        public static final String ALLOW
        The "Allow" header name. Valid actions for a specified resource. To be used for a 405 Method not allowed.
        See Also:
        Constant Field Values
      • ALT_SVC

        public static final String ALT_SVC
        The "Alt-Svc" 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.
        See Also:
        Constant Field Values
      • CACHE_CONTROL

        public static final String 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.
        See Also:
        Constant Field Values
      • CONNECTION

        public static final String CONNECTION
        The "Connection" header name. Control options for the current connection and list of hop-by-hop response fields.
        See Also:
        Constant Field Values
      • CONTENT_DISPOSITION

        public static final String CONTENT_DISPOSITION
        The "Content-Disposition" 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.
        See Also:
        Constant Field Values
      • CONTENT_ENCODING

        public static final String CONTENT_ENCODING
        The "Content-Encoding" header name. The type of encoding used on the data.
        See Also:
        Constant Field Values
      • CONTENT_LANGUAGE

        public static final String CONTENT_LANGUAGE
        The "Content-Language" header name. The natural language or languages of the intended audience for the enclosed content.
        See Also:
        Constant Field Values
      • CONTENT_LENGTH

        public static final String CONTENT_LENGTH
        The "Content-Length" header name. The length of the response body in octets.
        See Also:
        Constant Field Values
      • CONTENT_LOCATION

        public static final String CONTENT_LOCATION
        The "aa" header name. An alternate location for the returned data.
        See Also:
        Constant Field Values
      • CONTENT_RANGE

        public static final String CONTENT_RANGE
        The "Content-Range" header name. Where in a full body message this partial message belongs.
        See Also:
        Constant Field Values
      • CONTENT_TYPE

        public static final String CONTENT_TYPE
        The "Content-Type" header name. The MIME type of this content.
        See Also:
        Constant Field Values
      • DATE

        public static final String DATE
        The "Date" header name. The date and time that the message was sent (in HTTP-date format as defined by RFC 7231).
        See Also:
        Constant Field Values
      • ETAG

        public static final String ETAG
        The "ETag" header name. An identifier for a specific version of a resource, often a message digest.
        See Also:
        Constant Field Values
      • EXPIRES

        public static final String 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)
        See Also:
        Constant Field Values
      • LAST_MODIFIED

        public static final String LAST_MODIFIED
        The "Last-Modified" header name. The last modified date for the requested object (in HTTP-date format as defined by RFC 7231)
        See Also:
        Constant Field Values
      • LINK

        public static final String LINK
        The "Link" header name. Used to express a typed relationship with another resource, where the relation type is defined by RFC 5988.
        See Also:
        Constant Field Values
      • LOCATION

        public static final String LOCATION
        The "Location" header name. Used in redirection, or whenRequest a new resource has been created.
        See Also:
        Constant Field Values
      • PRAGMA

        public static final String PRAGMA
        The "Pragma" header name. Implementation-specific fields that may have various effects anywhere along the request-response chain.
        See Also:
        Constant Field Values
      • PUBLIC_KEY_PINS

        public static final String PUBLIC_KEY_PINS
        The "Public-Key-Pins" header name. HTTP Public Key Pinning, announces hash of website's authentic TLS certificate.
        See Also:
        Constant Field Values
      • RETRY_AFTER

        public static final String RETRY_AFTER
        The "Retry-After" 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.
        See Also:
        Constant Field Values
      • SET_COOKIE

        public static final String SET_COOKIE
        The "Set-Cookie" header name. An HTTP cookie set directive.
        See Also:
        Constant Field Values
      • STRICT_TRANSPORT_SECURITY

        public static final String 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.
        See Also:
        Constant Field Values
      • TRAILER

        public static final String 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.
        See Also:
        Constant Field Values
      • TRANSFER_ENCODING

        public static final String 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.
        See Also:
        Constant Field Values
      • TSV

        public static final String TSV
        The "TSV" header name. Tracking Status Value, value suggested to be sent in response to a DNT(do-not-track).
        See Also:
        Constant Field Values
      • UPGRADE

        public static final String UPGRADE
        The "Upgrade" header name. Ask to upgrade to another protocol.
        See Also:
        Constant Field Values
      • VARY

        public static final String 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.
        See Also:
        Constant Field Values
      • WARNING

        public static final String WARNING
        The "Warning" header name. A general warning about possible problems with the entity body.
        See Also:
        Constant Field Values
      • WWW_AUTHENTICATE

        public static final String WWW_AUTHENTICATE
        The "WWW-Authenticate" header name. Indicates the authentication scheme that should be used to access the requested entity.
        See Also:
        Constant Field Values