你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
HttpHeaderName Class
- java.
lang. Object - com.
azure. core. util. ExpandableStringEnum<T> - com.
azure. core. http. HttpHeaderName
- com.
- com.
public final class HttpHeaderName
extends ExpandableStringEnum<HttpHeaderName>
Represents HTTP header names for multiple versions of HTTP.
This class encapsulates the name of an HTTP header in a case-insensitive manner. It provides methods to access the case-sensitive and case-insensitive versions of the header name.
It also provides constants for commonly used HTTP header names. For example, you can use CONTENT_TYPE to get the Content-Type header name, and AUTHORIZATION to get the Authorization header name.
This class is useful when you want to work with the names of HTTP headers in a case-insensitive manner, or when you want to use the predefined constants for commonly used HTTP header names.
Note: This class extends ExpandableStringEnum<T>, so it can be used in the same way as other expandable string enums. For example, you can use the fromString(String name) method to get an instance of this class from a string.
Field Summary
Modifier and Type | Field and Description |
---|---|
static final
Http |
ACCEPT
|
static final
Http |
ACCEPT_CHARSET
|
static final
Http |
ACCEPT_DATETIME
|
static final
Http |
ACCEPT_ENCODING
|
static final
Http |
ACCEPT_LANGUAGE
|
static final
Http |
ACCEPT_PATCH
|
static final
Http |
ACCEPT_RANGES
|
static final
Http |
ACCESS_CONTROL_ALLOW_CREDENTIALS
|
static final
Http |
ACCESS_CONTROL_ALLOW_HEADERS
|
static final
Http |
ACCESS_CONTROL_ALLOW_METHODS
|
static final
Http |
ACCESS_CONTROL_ALLOW_ORIGIN
|
static final
Http |
ACCESS_CONTROL_EXPOSE_HEADERS
|
static final
Http |
ACCESS_CONTROL_MAX_AGE
|
static final
Http |
AGE
|
static final
Http |
ALLOW
|
static final
Http |
AUTHORIZATION
|
static final
Http |
AZURE_ASYNCOPERATION
|
static final
Http |
CACHE_CONTROL
|
static final
Http |
CONNECTION
|
static final
Http |
CONTENT_DISPOSITION
|
static final
Http |
CONTENT_ENCODING
|
static final
Http |
CONTENT_LANGUAGE
|
static final
Http |
CONTENT_LENGTH
|
static final
Http |
CONTENT_LOCATION
|
static final
Http |
CONTENT_MD5
|
static final
Http |
CONTENT_RANGE
|
static final
Http |
CONTENT_TYPE
|
static final
Http |
COOKIE
|
static final
Http |
DATE
|
static final
Http |
ETAG
|
static final
Http |
EXPECT
|
static final
Http |
EXPIRES
|
static final
Http |
FORWARDED
|
static final
Http |
FROM
|
static final
Http |
HOST
|
static final
Http |
HTTP2_SETTINGS
|
static final
Http |
IF_MATCH
|
static final
Http |
IF_MODIFIED_SINCE
|
static final
Http |
IF_NONE_MATCH
|
static final
Http |
IF_RANGE
|
static final
Http |
IF_UNMODIFIED_SINCE
|
static final
Http |
LAST_MODIFIED
|
static final
Http |
LINK
|
static final
Http |
LOCATION
|
static final
Http |
MAX_FORWARDS
|
static final
Http |
OPERATION_LOCATION
|
static final
Http |
ORIGIN
|
static final
Http |
PRAGMA
|
static final
Http |
PREFER
|
static final
Http |
PREFERENCE_APPLIED
|
static final
Http |
PROXY_AUTHENTICATE
|
static final
Http |
PROXY_AUTHORIZATION
|
static final
Http |
RANGE
|
static final
Http |
REFERER
|
static final
Http |
RETRY_AFTER
|
static final
Http |
RETRY_AFTER_MS
|
static final
Http |
SERVER
|
static final
Http |
SET_COOKIE
|
static final
Http |
STRICT_TRANSPORT_SECURITY
|
static final
Http |
TE
|
static final
Http |
TRACEPARENT
|
static final
Http |
TRAILER
|
static final
Http |
TRANSFER_ENCODING
|
static final
Http |
UPGRADE
|
static final
Http |
USER_AGENT
|
static final
Http |
VARY
|
static final
Http |
VIA
|
static final
Http |
WARNING
|
static final
Http |
WWW_AUTHENTICATE
|
static final
Http |
X_MS_CLIENT_ID
|
static final
Http |
X_MS_CLIENT_REQUEST_ID
|
static final
Http |
X_MS_DATE
|
static final
Http |
X_MS_REQUEST_ID
|
static final
Http |
X_MS_RETRY_AFTER_MS
|
Constructor Summary
Constructor | Description |
---|---|
HttpHeaderName() |
Deprecated
Use one of the constants or the fromString(String name) factory method.
Creates a new instance of HttpHeaderName without a #toString() value. |
Method Summary
Modifier and Type | Method and Description |
---|---|
boolean | equals(Object obj) |
static
Http |
fromString(String name)
Gets or creates the HttpHeaderName for the passed |
String |
getCaseInsensitiveName()
Gets the HTTP header name lower cased. |
String |
getCaseSensitiveName()
Gets the HTTP header name based on the name passed into fromString(String name). |
int | hashCode() |
Methods inherited from ExpandableStringEnum
Methods inherited from java.lang.Object
Field Details
ACCEPT
public static final HttpHeaderName ACCEPT
Accept
/accept
ACCEPT_CHARSET
public static final HttpHeaderName ACCEPT_CHARSET
Accept-Charset
/accept-charset
ACCEPT_DATETIME
public static final HttpHeaderName ACCEPT_DATETIME
Accept-Datetime
/accept-datetime
ACCEPT_ENCODING
public static final HttpHeaderName ACCEPT_ENCODING
Accept-Encoding
/accept-encoding
ACCEPT_LANGUAGE
public static final HttpHeaderName ACCEPT_LANGUAGE
Accept-Language
/accept-language
ACCEPT_PATCH
public static final HttpHeaderName ACCEPT_PATCH
Accept-Patch
/accept-patch
ACCEPT_RANGES
public static final HttpHeaderName ACCEPT_RANGES
Accept-Ranges
/accept-ranges
ACCESS_CONTROL_ALLOW_CREDENTIALS
public static final HttpHeaderName ACCESS_CONTROL_ALLOW_CREDENTIALS
Access-Control-Allow-Credentials
/access-control-allow-credentials
ACCESS_CONTROL_ALLOW_HEADERS
public static final HttpHeaderName ACCESS_CONTROL_ALLOW_HEADERS
Access-Control-Allow-Headers
/access-control-allow-headers
ACCESS_CONTROL_ALLOW_METHODS
public static final HttpHeaderName ACCESS_CONTROL_ALLOW_METHODS
Access-Control-Allow-Methods
/access-control-allow-methods
ACCESS_CONTROL_ALLOW_ORIGIN
public static final HttpHeaderName ACCESS_CONTROL_ALLOW_ORIGIN
Access-Control-Allow-Origin
/access-control-allow-origin
ACCESS_CONTROL_EXPOSE_HEADERS
public static final HttpHeaderName ACCESS_CONTROL_EXPOSE_HEADERS
Access-Control-Expose-Headers
/access-control-expose-headers
ACCESS_CONTROL_MAX_AGE
public static final HttpHeaderName ACCESS_CONTROL_MAX_AGE
Access-Control-Max-Age
/access-control-max-age
AGE
public static final HttpHeaderName AGE
Age
/age
ALLOW
public static final HttpHeaderName ALLOW
Allow
/allow
AUTHORIZATION
public static final HttpHeaderName AUTHORIZATION
Authorization
/authorization
AZURE_ASYNCOPERATION
public static final HttpHeaderName AZURE_ASYNCOPERATION
Azure-AsyncOperation
/azure-azyncoperation
CACHE_CONTROL
public static final HttpHeaderName CACHE_CONTROL
Cache-Control
/cache-control
CONNECTION
public static final HttpHeaderName CONNECTION
Connection
/connection
CONTENT_DISPOSITION
public static final HttpHeaderName CONTENT_DISPOSITION
Content-Disposition
/content-disposition
CONTENT_ENCODING
public static final HttpHeaderName CONTENT_ENCODING
Content-Encoding
/content-encoding
CONTENT_LANGUAGE
public static final HttpHeaderName CONTENT_LANGUAGE
Content-Language
/content-language
CONTENT_LENGTH
public static final HttpHeaderName CONTENT_LENGTH
Content-Length
/content-length
CONTENT_LOCATION
public static final HttpHeaderName CONTENT_LOCATION
Content-Location
/content-location
CONTENT_MD5
public static final HttpHeaderName CONTENT_MD5
Content-MD5
/content-md5
CONTENT_RANGE
public static final HttpHeaderName CONTENT_RANGE
Content-Range
/content-range
CONTENT_TYPE
public static final HttpHeaderName CONTENT_TYPE
Content-Type
/content-type
COOKIE
public static final HttpHeaderName COOKIE
Cookie
/cookie
DATE
public static final HttpHeaderName DATE
Date
/date
ETAG
public static final HttpHeaderName ETAG
ETag
/etag
EXPECT
public static final HttpHeaderName EXPECT
Expect
/expect
EXPIRES
public static final HttpHeaderName EXPIRES
Expires
/expires
FORWARDED
public static final HttpHeaderName FORWARDED
Forwarded
/forwarded
FROM
public static final HttpHeaderName FROM
From
/from
HOST
public static final HttpHeaderName HOST
Host
/host
HTTP2_SETTINGS
public static final HttpHeaderName HTTP2_SETTINGS
HTTP2-Settings
/http2-settings
IF_MATCH
public static final HttpHeaderName IF_MATCH
If-Match
/if-match
IF_MODIFIED_SINCE
public static final HttpHeaderName IF_MODIFIED_SINCE
If-Modified-Since
/if-modified-since
IF_NONE_MATCH
public static final HttpHeaderName IF_NONE_MATCH
If-None-Match
/if-none-match
IF_RANGE
public static final HttpHeaderName IF_RANGE
If-Range
/if-range
IF_UNMODIFIED_SINCE
public static final HttpHeaderName IF_UNMODIFIED_SINCE
If-Unmodified-Since
/if-unmodified-since
LAST_MODIFIED
public static final HttpHeaderName LAST_MODIFIED
Last-Modified
/last-modified
LINK
public static final HttpHeaderName LINK
Link
/link
LOCATION
public static final HttpHeaderName LOCATION
Location
/location
MAX_FORWARDS
public static final HttpHeaderName MAX_FORWARDS
Max-Forwards
/max-forwards
OPERATION_LOCATION
public static final HttpHeaderName OPERATION_LOCATION
Operation-Location
/operation-location
ORIGIN
public static final HttpHeaderName ORIGIN
Origin
/origin
PRAGMA
public static final HttpHeaderName PRAGMA
Pragma
/pragma
PREFER
public static final HttpHeaderName PREFER
Prefer
/prefer
PREFERENCE_APPLIED
public static final HttpHeaderName PREFERENCE_APPLIED
Preference-Applied
/preference-applied
PROXY_AUTHENTICATE
public static final HttpHeaderName PROXY_AUTHENTICATE
Proxy-Authenticate
/proxy-authenticate
PROXY_AUTHORIZATION
public static final HttpHeaderName PROXY_AUTHORIZATION
Proxy-Authorization
/proxy-authorization
RANGE
public static final HttpHeaderName RANGE
Range
/range
REFERER
public static final HttpHeaderName REFERER
Referer
/referer
RETRY_AFTER
public static final HttpHeaderName RETRY_AFTER
Retry-After
/retry-after
RETRY_AFTER_MS
public static final HttpHeaderName RETRY_AFTER_MS
retry-after-ms
SERVER
public static final HttpHeaderName SERVER
Server
/server
SET_COOKIE
public static final HttpHeaderName SET_COOKIE
Set-Cookie
/set-cookie
STRICT_TRANSPORT_SECURITY
public static final HttpHeaderName STRICT_TRANSPORT_SECURITY
Strict-Transport-Security
/strict-transport-security
TE
public static final HttpHeaderName TE
TE
/te
TRACEPARENT
public static final HttpHeaderName TRACEPARENT
traceparent
TRAILER
public static final HttpHeaderName TRAILER
Trailer
/trailer
TRANSFER_ENCODING
public static final HttpHeaderName TRANSFER_ENCODING
Transfer-Encoding
/transfer-encoding
UPGRADE
public static final HttpHeaderName UPGRADE
Upgrade
/upgrade
USER_AGENT
public static final HttpHeaderName USER_AGENT
User-Agent
/user-agent
VARY
public static final HttpHeaderName VARY
Vary
/vary
VIA
public static final HttpHeaderName VIA
Via
/via
WARNING
public static final HttpHeaderName WARNING
Warning
/warning
WWW_AUTHENTICATE
public static final HttpHeaderName WWW_AUTHENTICATE
WWW-Authenticate
/www-authenticate
X_MS_CLIENT_ID
public static final HttpHeaderName X_MS_CLIENT_ID
x-ms-client-request-id
X_MS_CLIENT_REQUEST_ID
public static final HttpHeaderName X_MS_CLIENT_REQUEST_ID
x-ms-client-request-id
X_MS_DATE
public static final HttpHeaderName X_MS_DATE
x-ms-date
X_MS_REQUEST_ID
public static final HttpHeaderName X_MS_REQUEST_ID
x-ms-request-id
X_MS_RETRY_AFTER_MS
public static final HttpHeaderName X_MS_RETRY_AFTER_MS
x-ms-retry-after-ms
Constructor Details
HttpHeaderName
@Deprecated
public HttpHeaderName()
Deprecated
Creates a new instance of HttpHeaderName without a #toString() value.
This constructor shouldn't be called as it will produce a HttpHeaderName which doesn't have a String enum value.
Method Details
equals
public boolean equals(Object obj)
Overrides:
HttpHeaderName.equals(Object obj)Parameters:
fromString
public static HttpHeaderName fromString(String name)
Gets or creates the HttpHeaderName for the passed name
.
null will be returned if name
is null.
Parameters:
Returns:
getCaseInsensitiveName
public String getCaseInsensitiveName()
Gets the HTTP header name lower cased.
Returns:
getCaseSensitiveName
public String getCaseSensitiveName()
Gets the HTTP header name based on the name passed into fromString(String name).
Returns:
hashCode
public int hashCode()
Overrides:
HttpHeaderName.hashCode()