public class Headers
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ACCEPT
Informs the server about the mime types of data that can be sent back.
|
static java.lang.String |
ACCEPT_CH
Servers can advertise support for Client Hints using the
Accept-CH header field or an equivalent HTML <meta> element with http-equiv attribute. |
static java.lang.String |
ACCEPT_ENCODING
The encoding algorithm, usually a compression algorithm, that can be used on the resource sent back.
|
static java.lang.String |
ACCEPT_LANGUAGE
Informs the server about the human language the server is expected to send back.
|
static java.lang.String |
ACCEPT_PUSH_POLICY
A client can express the desired push policy for a request by sending an Accept-Push-Policy header field in the request.
|
static java.lang.String |
ACCEPT_RANGES
Indicates if the server supports range requests, and if so in which unit the range can be expressed.
|
static java.lang.String |
ACCEPT_SIGNATURE
A client can send the Accept-Signature header field to indicate intention to take advantage of any available signatures and to indicate what kinds of signatures it supports.
|
static java.lang.String |
ACCESS_CONTROL_ALLOW_CREDENTIALS
Indicates whether the response to the request can be exposed when the credentials flag is true.
|
static java.lang.String |
ACCESS_CONTROL_ALLOW_HEADERS
Used in response to a preflight request to indicate which HTTP headers can be used when making the actual request.
|
static java.lang.String |
ACCESS_CONTROL_ALLOW_METHODS
Specifies the methods allowed when accessing the resource in response to a preflight request.
|
static java.lang.String |
ACCESS_CONTROL_ALLOW_ORIGIN
Indicates whether the response can be shared.
|
static java.lang.String |
ACCESS_CONTROL_EXPOSE_HEADERS
Indicates which headers can be exposed as part of the response by listing their names.
|
static java.lang.String |
ACCESS_CONTROL_MAX_AGE
Indicates how long the results of a preflight request can be cached.
|
static java.lang.String |
ACCESS_CONTROL_REQUEST_HEADERS
Used when issuing a preflight request to let the server know which HTTP headers will be used when the actual request is made.
|
static java.lang.String |
ACCESS_CONTROL_REQUEST_METHOD
Used when issuing a preflight request to let the server know which HTTP method will be used when the actual request is made.
|
static java.lang.String |
AGE
The time, in seconds, that the object has been in a proxy cache.
|
static java.lang.String |
ALLOW
Lists the set of HTTP request methods supported by a resource.
|
static java.lang.String |
ALT_SVC
Used to list alternate ways to reach this service.
|
static java.lang.String |
ALT_USED
Used to identify the alternative service in use.
|
static java.lang.String |
AUTHORIZATION
Contains the credentials to authenticate a user-agent with a server.
|
static java.lang.String |
CACHE_CONTROL
Directives for caching mechanisms in both requests and responses.
|
static java.lang.String |
CLEAR_SITE_DATA
Clears browsing data (e.g. cookies, storage, cache) associated with the requesting website.
|
static java.lang.String |
CONNECTION
Controls whether the network connection stays open after the current transaction finishes.
|
static java.lang.String |
CONTENT_DISPOSITION
Indicates if the resource transmitted should be displayed inline (default behavior without the header), or if it should be handled like a download and the browser should present a "Save As" dialog.
|
static java.lang.String |
CONTENT_ENCODING
Used to specify the compression algorithm.
|
static java.lang.String |
CONTENT_LANGUAGE
Describes the human language(s) intended for the audience, so that it allows a user to differentiate according to the users' own preferred language.
|
static java.lang.String |
CONTENT_LENGTH
The size of the resource, in decimal number of bytes.
|
static java.lang.String |
CONTENT_LOCATION
Indicates an alternate location for the returned data.
|
static java.lang.String |
CONTENT_RANGE
Indicates where in a full body message a partial message belongs.
|
static java.lang.String |
CONTENT_SECURITY_POLICY
Controls resources the user agent is allowed to load for a given page.
|
static java.lang.String |
CONTENT_SECURITY_POLICY_REPORT_ONLY
Allows web developers to experiment with policies by monitoring, but not enforcing, their effects.
|
static java.lang.String |
CONTENT_TYPE
Indicates the media type of the resource.
|
static java.lang.String |
COOKIE
Contains stored HTTP cookies previously sent by the server with the
SET_COOKIE header. |
static java.lang.String |
CRITICAL_CH
Servers use
Critical-CH along with ACCEPT_CH to specify that accepted client hints are also critical client hints. |
static java.lang.String |
CROSS_ORIGIN_EMBEDDER_POLICY
Allows a server to declare an embedder policy for a given document.
|
static java.lang.String |
CROSS_ORIGIN_OPENER_POLICY
Prevents other domains from opening/controlling a window.
|
static java.lang.String |
CROSS_ORIGIN_RESOURCE_POLICY
Prevents other domains from reading the response of the resources to which this header is applied.
|
static java.lang.String |
DATE
Contains the date and time at which the message was originated.
|
static java.lang.String |
DEVICE_MEMORY
Approximate amount of available client RAM memory.
|
static java.lang.String |
DOWNLINK
Approximate bandwidth of the client's connection to the server, in Mbps.
|
static java.lang.String |
EARLY_DATA
Indicates that the request has been conveyed in TLS early data.
|
static java.lang.String |
ECT
The
effective connection type ("network profile") that best matches the connection's latency and bandwidth. |
static java.lang.String |
ETAG
A unique string identifying the version of the resource.
|
static java.lang.String |
EXPECT
Indicates expectations that need to be fulfilled by the server to properly handle the request.
|
static java.lang.String |
EXPIRES
The date/time after which the response is considered stale.
|
static java.lang.String |
FORWARDED
Contains information from the client-facing side of proxy servers that is altered or lost when a proxy is involved in the path of the request.
|
static java.lang.String |
FROM
Contains an Internet email address for a human user who controls the requesting user agent.
|
static java.lang.String |
HOST
Specifies the domain name of the server (for virtual hosting), and (optionally) the TCP port number on which the server is listening.
|
static java.lang.String |
IF_MATCH
Makes the request conditional, and applies the method only if the stored resource matches one of the given ETags.
|
static java.lang.String |
IF_MODIFIED_SINCE
Makes the request conditional, and expects the resource to be transmitted only if it has been modified after the given date.
|
static java.lang.String |
IF_NONE_MATCH
Makes the request conditional, and applies the method only if the stored resource doesn't match any of the given ETags.
|
static java.lang.String |
IF_RANGE
Creates a conditional range request that is only fulfilled if the given etag or date matches the remote resource.
|
static java.lang.String |
IF_UNMODIFIED_SINCE
Makes the request conditional, and expects the resource to be transmitted only if it has not been modified after the given date.
|
static java.lang.String |
KEEP_ALIVE
Controls how long a persistent connection should stay open.
|
static java.lang.String |
LAST_MODIFIED
The last modification date of the resource, used to compare several versions of the same resource.
|
static java.lang.String |
LINK
This entity-header field provides a means for serializing one or more links in HTTP headers.
|
static java.lang.String |
LOCATION
Indicates the URL to redirect a page to.
|
static java.lang.String |
MAX_FORWARDS
When using https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/TRACE, indicates the maximum number of hops the request can do before being reflected to the sender.
|
static java.lang.String |
NEL
Defines a mechanism that enables developers to declare a network error reporting policy.
|
static java.lang.String |
ORIGIN
Indicates where a fetch originates from.
|
static java.lang.String |
ORIGIN_ISOLATION
Provides a mechanism to allow web applications to isolate their origins.
|
static java.lang.String |
PERMISSIONS_POLICY
Provides a mechanism to allow and deny the use of browser features in a website's own frame, and in
iframes that it embeds. |
static java.lang.String |
PRAGMA
Implementation-specific header that may have various effects anywhere along the request-response chain.
|
static java.lang.String |
PROXY_AUTHENTICATE
Defines the authentication method that should be used to access a resource behind a proxy server.
|
static java.lang.String |
PROXY_AUTHORIZATION
Contains the credentials to authenticate a user agent with a proxy server.
|
static java.lang.String |
PUSH_POLICY
A Push-Policy defines the server behavior regarding push when processing a request.
|
static java.lang.String |
RANGE
Indicates the part of a document that the server should return.
|
static java.lang.String |
REFERER
The address of the previous web page from which a link to the currently requested page was followed.
|
static java.lang.String |
REFERRER_POLICY
Governs which referrer information sent in the
REFERER header should be included with requests made. |
static java.lang.String |
REFRESH
Directs the browser to reload the page or redirect to another.
|
static java.lang.String |
REPORT_TO
Used to specify a server endpoint for the browser to send warning and error reports to.
|
static java.lang.String |
RETRY_AFTER
Indicates how long the user agent should wait before making a follow-up request.
|
static java.lang.String |
RTT
Application layer round trip time (RTT) in milliseconds, which includes the server processing time.
|
static java.lang.String |
SAVE_DATA
A string
on that indicates the user agent's preference for reduced data usage. |
static java.lang.String |
SEC_CH_UA
User agent's branding and version.
|
static java.lang.String |
SEC_CH_UA_ARCH
User agent's underlying platform architecture.
|
static java.lang.String |
SEC_CH_UA_BITNESS
User agent's underlying CPU architecture bitness (for example "64" bit).
|
static java.lang.String |
SEC_CH_UA_FULL_VERSION_LIST
Full version for each brand in the user agent's brand list.
|
static java.lang.String |
SEC_CH_UA_MOBILE
User agent is running on a mobile device or, more generally, prefers a "mobile" user experience.
|
static java.lang.String |
SEC_CH_UA_MODEL
User agent's device model.
|
static java.lang.String |
SEC_CH_UA_PLATFORM
User agent's underlying operation system/platform.
|
static java.lang.String |
SEC_CH_UA_PLATFORM_VERSION
User agent's underlying operation system version.
|
static java.lang.String |
SEC_CH_UA_PREFERS_COLOR_SCHEME
User's preference of dark or light color scheme.
|
static java.lang.String |
SEC_CH_UA_PREFERS_REDUCED_MOTION
User's preference to see fewer animations and content layout shifts.
|
static java.lang.String |
SEC_FETCH_DEST
Indicates the request's destination.
|
static java.lang.String |
SEC_FETCH_MODE
Indicates the request's mode to a server.
|
static java.lang.String |
SEC_FETCH_SITE
Indicates the relationship between a request initiator's origin and its target's origin.
|
static java.lang.String |
SEC_FETCH_USER
Indicates whether or not a navigation request was triggered by user activation.
|
static java.lang.String |
SEC_GPC
Indicates whether the user consents to a website or service selling or sharing their personal information with third parties.
|
static java.lang.String |
SEC_PURPOSE
Indicates the purpose of the request, when the purpose is something other than immediate use by the user-agent.
|
static java.lang.String |
SERVER
Contains information about the software used by the origin server to handle the request.
|
static java.lang.String |
SERVER_TIMING
Communicates one or more metrics and descriptions for the given request-response cycle.
|
static java.lang.String |
SERVICE_WORKER_ALLOWED
Used to remove the path restriction by including this header in the response of the Service Worker script.
|
static java.lang.String |
SERVICE_WORKER_NAVIGATION_PRELOAD
A request header sent in preemptive request to
fetch() a resource during service worker boot. |
static java.lang.String |
SET_COOKIE
Send cookies from the server to the user-agent.
|
static java.lang.String |
SIGNATURE
The Signature header field conveys a list of signatures for an exchange, each one accompanied by information about how to determine the authority of and refresh that signature.
|
static java.lang.String |
SIGNED_HEADERS
The Signed-Headers header field identifies an ordered list of response header fields to include in a signature.
|
static java.lang.String |
SOURCEMAP
Links generated code to a source map.
|
static java.lang.String |
STRICT_TRANSPORT_SECURITY
Force communication using HTTPS instead of HTTP.
|
static java.lang.String |
SUPPORTS_LOADING_MODE
Set by a navigation target to opt-in to using various higher-risk loading modes.
|
static java.lang.String |
TE
Specifies the transfer encodings the user agent is willing to accept.
|
static java.lang.String |
TIMING_ALLOW_ORIGIN
Specifies origins that are allowed to see values of attributes retrieved via features of the Resource Timing API, which would otherwise be reported as zero due to cross-origin restrictions.
|
static java.lang.String |
TRAILER
Allows the sender to include additional fields at the end of chunked message.
|
static java.lang.String |
TRANSFER_ENCODING
Specifies the form of encoding used to safely transfer the resource to the user.
|
static java.lang.String |
UPGRADE
This HTTP/1.1 (only) header can be used to upgrade an already established client/server connection to a different protocol (over the same transport protocol).
|
static java.lang.String |
UPGRADE_INSECURE_REQUESTS
Sends a signal to the server expressing the client's preference for an encrypted and authenticated response, and that it can successfully handle the
upgrade-insecure-requests directive. |
static java.lang.String |
USER_AGENT
Contains a characteristic string that allows the network protocol peers to identify the application type, operating system, software vendor or software version of the requesting software user agent.
|
static java.lang.String |
VARY
Determines how to match request headers to decide whether a cached response can be used rather than requesting a fresh one from the origin server.
|
static java.lang.String |
VIA
Added by proxies, both forward and reverse proxies, and can appear in the request headers and the response headers.
|
static java.lang.String |
WARNING
General warning information about possible problems.
|
static java.lang.String |
WWW_AUTHENTICATE
Defines the authentication method that should be used to access a resource.
|
static java.lang.String |
X_CONTENT_TYPE_OPTIONS
Disables MIME sniffing and forces browser to use the type given in
CONTENT_TYPE. |
static java.lang.String |
X_DNS_PREFETCH_CONTROL
Controls DNS prefetching, a feature by which browsers proactively perform domain name resolution on both links that the user may choose to follow as well as URLs for items referenced by the document, including images, CSS, JavaScript, and so forth.
|
static java.lang.String |
X_FORWARDED_FOR
Identifies the originating IP addresses of a client connecting to a web server through an HTTP proxy or a load balancer.
|
static java.lang.String |
X_FORWARDED_HOST
Identifies the original host requested that a client used to connect to your proxy or load balancer.
|
static java.lang.String |
X_FORWARDED_PROTO
Identifies the protocol (HTTP or HTTPS) that a client used to connect to your proxy or load balancer.
|
static java.lang.String |
X_FRAME_OPTIONS
Indicates whether a browser should be allowed to render a page in a
frame, iframe, embed or object. |
static java.lang.String |
X_PERMITTED_CROSS_DOMAIN_POLICIES
Specifies if a cross-domain policy file (
crossdomain.xml) is allowed. |
static java.lang.String |
X_POWERED_BY
May be set by hosting environments or other frameworks and contains information about them while not providing any usefulness to the application or its visitors.
|
static java.lang.String |
X_ROBOTS_TAG
The X-Robots-Tag HTTP header is used to indicate how a web page is to be indexed within public search engine results.
|
static java.lang.String |
X_XSS_PROTECTION
Enables cross-site scripting filtering.
|
| Constructor and Description |
|---|
Headers() |
public static final java.lang.String WWW_AUTHENTICATE
public static final java.lang.String AUTHORIZATION
public static final java.lang.String PROXY_AUTHENTICATE
public static final java.lang.String PROXY_AUTHORIZATION
public static final java.lang.String AGE
public static final java.lang.String CACHE_CONTROL
public static final java.lang.String CLEAR_SITE_DATA
public static final java.lang.String EXPIRES
public static final java.lang.String LAST_MODIFIED
ETAG, but easier to calculate in some environments.IF_MODIFIED_SINCE and IF_UNMODIFIED_SINCE use this value to change the behavior of the request.public static final java.lang.String ETAG
IF_MATCH and IF_NONE_MATCH use this value to change the behavior of the request.public static final java.lang.String IF_MATCH
public static final java.lang.String IF_NONE_MATCH
public static final java.lang.String IF_MODIFIED_SINCE
public static final java.lang.String IF_UNMODIFIED_SINCE
public static final java.lang.String VARY
public static final java.lang.String CONNECTION
public static final java.lang.String KEEP_ALIVE
public static final java.lang.String ACCEPT
public static final java.lang.String ACCEPT_ENCODING
public static final java.lang.String ACCEPT_LANGUAGE
public static final java.lang.String EXPECT
public static final java.lang.String MAX_FORWARDS
public static final java.lang.String COOKIE
SET_COOKIE header.public static final java.lang.String SET_COOKIE
public static final java.lang.String ACCESS_CONTROL_ALLOW_CREDENTIALS
public static final java.lang.String ACCESS_CONTROL_ALLOW_HEADERS
public static final java.lang.String ACCESS_CONTROL_ALLOW_METHODS
public static final java.lang.String ACCESS_CONTROL_ALLOW_ORIGIN
public static final java.lang.String ACCESS_CONTROL_EXPOSE_HEADERS
public static final java.lang.String ACCESS_CONTROL_MAX_AGE
public static final java.lang.String ACCESS_CONTROL_REQUEST_HEADERS
public static final java.lang.String ACCESS_CONTROL_REQUEST_METHOD
public static final java.lang.String ORIGIN
public static final java.lang.String TIMING_ALLOW_ORIGIN
public static final java.lang.String CONTENT_DISPOSITION
public static final java.lang.String CONTENT_LENGTH
public static final java.lang.String CONTENT_TYPE
public static final java.lang.String CONTENT_ENCODING
public static final java.lang.String CONTENT_LANGUAGE
public static final java.lang.String CONTENT_LOCATION
public static final java.lang.String FORWARDED
public static final java.lang.String VIA
public static final java.lang.String LOCATION
public static final java.lang.String REFRESH
public static final java.lang.String FROM
public static final java.lang.String HOST
public static final java.lang.String REFERER
public static final java.lang.String REFERRER_POLICY
REFERER header should be included with requests made.public static final java.lang.String USER_AGENT
public static final java.lang.String ALLOW
public static final java.lang.String SERVER
public static final java.lang.String ACCEPT_RANGES
public static final java.lang.String RANGE
public static final java.lang.String IF_RANGE
public static final java.lang.String CONTENT_RANGE
public static final java.lang.String CROSS_ORIGIN_EMBEDDER_POLICY
public static final java.lang.String CROSS_ORIGIN_OPENER_POLICY
public static final java.lang.String CROSS_ORIGIN_RESOURCE_POLICY
public static final java.lang.String CONTENT_SECURITY_POLICY
public static final java.lang.String CONTENT_SECURITY_POLICY_REPORT_ONLY
POST request to the specified URI.public static final java.lang.String PERMISSIONS_POLICY
iframes that it embeds.public static final java.lang.String STRICT_TRANSPORT_SECURITY
public static final java.lang.String UPGRADE_INSECURE_REQUESTS
upgrade-insecure-requests directive.public static final java.lang.String X_CONTENT_TYPE_OPTIONS
CONTENT_TYPE.public static final java.lang.String X_FRAME_OPTIONS
frame, iframe, embed or object.public static final java.lang.String X_PERMITTED_CROSS_DOMAIN_POLICIES
crossdomain.xml) is allowed.public static final java.lang.String X_POWERED_BY
public static final java.lang.String X_XSS_PROTECTION
public static final java.lang.String SEC_FETCH_SITE
cross-site, same-origin, same-site, and none.public static final java.lang.String SEC_FETCH_MODE
cors, navigate, no-cors, same-origin, and websocket.public static final java.lang.String SEC_FETCH_USER
?0 for false and ?1 for true.public static final java.lang.String SEC_FETCH_DEST
audio, audioworklet, document, embed, empty, font, image, manifest, object, paintworklet, report, script, serviceworker, sharedworker, style, track, video, worker, and xslt.public static final java.lang.String SEC_PURPOSE
prefetch, which indicates that the resource is being fetched preemptively for a possible future navigation.public static final java.lang.String SERVICE_WORKER_NAVIGATION_PRELOAD
fetch() a resource during service worker boot.NavigationPreloadManager.setHeaderValue()", can be used to inform a server that a different resource should be returned than in a normal fetch() operation.public static final java.lang.String REPORT_TO
public static final java.lang.String TRANSFER_ENCODING
public static final java.lang.String TE
public static final java.lang.String TRAILER
public static final java.lang.String ALT_SVC
public static final java.lang.String ALT_USED
public static final java.lang.String DATE
public static final java.lang.String LINK
link element.public static final java.lang.String RETRY_AFTER
public static final java.lang.String SERVER_TIMING
public static final java.lang.String SERVICE_WORKER_ALLOWED
public static final java.lang.String SOURCEMAP
public static final java.lang.String UPGRADE
public static final java.lang.String ACCEPT_CH
Accept-CH header field or an equivalent HTML <meta> element with http-equiv attribute.public static final java.lang.String CRITICAL_CH
Critical-CH along with ACCEPT_CH to specify that accepted client hints are also critical client hints.public static final java.lang.String SEC_CH_UA
public static final java.lang.String SEC_CH_UA_ARCH
public static final java.lang.String SEC_CH_UA_BITNESS
public static final java.lang.String SEC_CH_UA_FULL_VERSION_LIST
public static final java.lang.String SEC_CH_UA_MOBILE
public static final java.lang.String SEC_CH_UA_MODEL
public static final java.lang.String SEC_CH_UA_PLATFORM
public static final java.lang.String SEC_CH_UA_PLATFORM_VERSION
public static final java.lang.String SEC_CH_UA_PREFERS_COLOR_SCHEME
public static final java.lang.String SEC_CH_UA_PREFERS_REDUCED_MOTION
public static final java.lang.String DEVICE_MEMORY
public static final java.lang.String DOWNLINK
public static final java.lang.String ECT
effective connection type ("network profile") that best matches the connection's latency and bandwidth.public static final java.lang.String RTT
public static final java.lang.String SAVE_DATA
on that indicates the user agent's preference for reduced data usage.public static final java.lang.String SEC_GPC
public static final java.lang.String ORIGIN_ISOLATION
public static final java.lang.String NEL
public static final java.lang.String ACCEPT_PUSH_POLICY
public static final java.lang.String ACCEPT_SIGNATURE
public static final java.lang.String EARLY_DATA
public static final java.lang.String PUSH_POLICY
public static final java.lang.String SIGNATURE
public static final java.lang.String SIGNED_HEADERS
public static final java.lang.String SUPPORTS_LOADING_MODE
Supports-Loading-Mode value of credentialed-prerender.public static final java.lang.String X_FORWARDED_FOR
public static final java.lang.String X_FORWARDED_HOST
public static final java.lang.String X_FORWARDED_PROTO
public static final java.lang.String X_DNS_PREFETCH_CONTROL
public static final java.lang.String X_ROBOTS_TAG
<meta name="robots" content="…">.public static final java.lang.String PRAGMA
Cache-Control header is not yet present.public static final java.lang.String WARNING