Class HttpHeaderName
- All Implemented Interfaces:
ExpandableEnum<String>
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, so it can be used in the same way as other expandable string
enums. For example, you can use the fromString(String) method to get an instance of this class from a string.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HttpHeaderNameAccept/acceptstatic final HttpHeaderNameAccept-Charset/accept-charsetstatic final HttpHeaderNameAccept-Datetime/accept-datetimestatic final HttpHeaderNameAccept-Encoding/accept-encodingstatic final HttpHeaderNameAccept-Language/accept-languagestatic final HttpHeaderNameAccept-Patch/accept-patchstatic final HttpHeaderNameAccept-Ranges/accept-rangesstatic final HttpHeaderNameAccess-Control-Allow-Credentials/access-control-allow-credentialsstatic final HttpHeaderNameAccess-Control-Allow-Headers/access-control-allow-headersstatic final HttpHeaderNameAccess-Control-Allow-Methods/access-control-allow-methodsstatic final HttpHeaderNameAccess-Control-Allow-Origin/access-control-allow-originstatic final HttpHeaderNameAccess-Control-Expose-Headers/access-control-expose-headersstatic final HttpHeaderNameAccess-Control-Max-Age/access-control-max-agestatic final HttpHeaderNameAge/agestatic final HttpHeaderNameAllow/allowstatic final HttpHeaderNameAuthorization/authorizationstatic final HttpHeaderNameAzure-AsyncOperation/azure-azyncoperationstatic final HttpHeaderNameCache-Control/cache-controlstatic final HttpHeaderNameConnection/connectionstatic final HttpHeaderNameContent-Disposition/content-dispositionstatic final HttpHeaderNameContent-Encoding/content-encodingstatic final HttpHeaderNameContent-Language/content-languagestatic final HttpHeaderNameContent-Length/content-lengthstatic final HttpHeaderNameContent-Location/content-locationstatic final HttpHeaderNameContent-MD5/content-md5static final HttpHeaderNameContent-Range/content-rangestatic final HttpHeaderNameContent-Type/content-typestatic final HttpHeaderNameCookie/cookiestatic final HttpHeaderNameDate/datestatic final HttpHeaderNameETag/etagstatic final HttpHeaderNameExpect/expectstatic final HttpHeaderNameExpires/expiresstatic final HttpHeaderNameForwarded/forwardedstatic final HttpHeaderNameFrom/fromstatic final HttpHeaderNameHost/hoststatic final HttpHeaderNameHTTP2-Settings/http2-settingsstatic final HttpHeaderNameIf-Match/if-matchstatic final HttpHeaderNameIf-Modified-Since/if-modified-sincestatic final HttpHeaderNameIf-None-Match/if-none-matchstatic final HttpHeaderNameIf-Range/if-rangestatic final HttpHeaderNameIf-Unmodified-Since/if-unmodified-sincestatic final HttpHeaderNameLast-Modified/last-modifiedstatic final HttpHeaderNameLink/linkstatic final HttpHeaderNameLocation/locationstatic final HttpHeaderNameMax-Forwards/max-forwardsstatic final HttpHeaderNameOperation-Location/operation-locationstatic final HttpHeaderNameOrigin/originstatic final HttpHeaderNamePragma/pragmastatic final HttpHeaderNamePrefer/preferstatic final HttpHeaderNamePreference-Applied/preference-appliedstatic final HttpHeaderNameProxy-Authenticate/proxy-authenticatestatic final HttpHeaderNameProxy-Authorization/proxy-authorizationstatic final HttpHeaderNameRange/rangestatic final HttpHeaderNameReferer/refererstatic final HttpHeaderNameRetry-After/retry-afterstatic final HttpHeaderNameretry-after-msstatic final HttpHeaderNameServer/serverstatic final HttpHeaderNameSet-Cookie/set-cookiestatic final HttpHeaderNameStrict-Transport-Security/strict-transport-securitystatic final HttpHeaderNameTE/testatic final HttpHeaderNametraceparentstatic final HttpHeaderNameTrailer/trailerstatic final HttpHeaderNameTransfer-Encoding/transfer-encodingstatic final HttpHeaderNameUpgrade/upgradestatic final HttpHeaderNameUser-Agent/user-agentstatic final HttpHeaderNameVary/varystatic final HttpHeaderNameVia/viastatic final HttpHeaderNameWarning/warningstatic final HttpHeaderNameWWW-Authenticate/www-authenticatestatic final HttpHeaderNamex-ms-client-request-idstatic final HttpHeaderNamex-ms-client-request-idstatic final HttpHeaderNamex-ms-datestatic final HttpHeaderNamex-ms-request-idstatic final HttpHeaderNamex-ms-retry-after-ms -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic HttpHeaderNamefromString(String name) Gets or creates theHttpHeaderNamefor the passedname.Gets the HTTP header name lower cased.Gets the HTTP header name based on the name passed intofromString(String).inthashCode()Methods inherited from class com.azure.core.util.ExpandableStringEnum
fromString, getValue, toString, values
-
Field Details
-
ACCEPT
Accept/accept -
ACCEPT_CHARSET
Accept-Charset/accept-charset -
ACCESS_CONTROL_ALLOW_CREDENTIALS
Access-Control-Allow-Credentials/access-control-allow-credentials -
ACCESS_CONTROL_ALLOW_HEADERS
Access-Control-Allow-Headers/access-control-allow-headers -
ACCESS_CONTROL_ALLOW_METHODS
Access-Control-Allow-Methods/access-control-allow-methods -
ACCESS_CONTROL_ALLOW_ORIGIN
Access-Control-Allow-Origin/access-control-allow-origin -
ACCESS_CONTROL_EXPOSE_HEADERS
Access-Control-Expose-Headers/access-control-expose-headers -
ACCESS_CONTROL_MAX_AGE
Access-Control-Max-Age/access-control-max-age -
ACCEPT_DATETIME
Accept-Datetime/accept-datetime -
ACCEPT_ENCODING
Accept-Encoding/accept-encoding -
ACCEPT_LANGUAGE
Accept-Language/accept-language -
ACCEPT_PATCH
Accept-Patch/accept-patch -
ACCEPT_RANGES
Accept-Ranges/accept-ranges -
AGE
Age/age -
ALLOW
Allow/allow -
AUTHORIZATION
Authorization/authorization -
AZURE_ASYNCOPERATION
Azure-AsyncOperation/azure-azyncoperation -
CACHE_CONTROL
Cache-Control/cache-control -
CONNECTION
Connection/connection -
CONTENT_DISPOSITION
Content-Disposition/content-disposition -
CONTENT_ENCODING
Content-Encoding/content-encoding -
CONTENT_LANGUAGE
Content-Language/content-language -
CONTENT_LENGTH
Content-Length/content-length -
CONTENT_LOCATION
Content-Location/content-location -
CONTENT_MD5
Content-MD5/content-md5 -
CONTENT_RANGE
Content-Range/content-range -
CONTENT_TYPE
Content-Type/content-type -
COOKIE
Cookie/cookie -
DATE
Date/date -
ETAG
ETag/etag -
EXPECT
Expect/expect -
EXPIRES
Expires/expires -
FORWARDED
Forwarded/forwarded -
FROM
From/from -
HOST
Host/host -
HTTP2_SETTINGS
HTTP2-Settings/http2-settings -
IF_MATCH
If-Match/if-match -
IF_MODIFIED_SINCE
If-Modified-Since/if-modified-since -
IF_NONE_MATCH
If-None-Match/if-none-match -
IF_RANGE
If-Range/if-range -
IF_UNMODIFIED_SINCE
If-Unmodified-Since/if-unmodified-since -
LAST_MODIFIED
Last-Modified/last-modified -
LINK
Link/link -
LOCATION
Location/location -
MAX_FORWARDS
Max-Forwards/max-forwards -
OPERATION_LOCATION
Operation-Location/operation-location -
ORIGIN
Origin/origin -
PRAGMA
Pragma/pragma -
PREFER
Prefer/prefer -
PREFERENCE_APPLIED
Preference-Applied/preference-applied -
PROXY_AUTHENTICATE
Proxy-Authenticate/proxy-authenticate -
PROXY_AUTHORIZATION
Proxy-Authorization/proxy-authorization -
RANGE
Range/range -
REFERER
Referer/referer -
RETRY_AFTER
Retry-After/retry-after -
RETRY_AFTER_MS
retry-after-ms -
SERVER
Server/server -
SET_COOKIE
Set-Cookie/set-cookie -
STRICT_TRANSPORT_SECURITY
Strict-Transport-Security/strict-transport-security -
TE
TE/te -
TRAILER
Trailer/trailer -
TRANSFER_ENCODING
Transfer-Encoding/transfer-encoding -
USER_AGENT
User-Agent/user-agent -
UPGRADE
Upgrade/upgrade -
VARY
Vary/vary -
VIA
Via/via -
WARNING
Warning/warning -
WWW_AUTHENTICATE
WWW-Authenticate/www-authenticate -
X_MS_CLIENT_ID
x-ms-client-request-id -
X_MS_CLIENT_REQUEST_ID
x-ms-client-request-id -
X_MS_DATE
x-ms-date -
X_MS_REQUEST_ID
x-ms-request-id -
X_MS_RETRY_AFTER_MS
x-ms-retry-after-ms -
TRACEPARENT
traceparent
-
-
Constructor Details
-
HttpHeaderName
Deprecated.Use one of the constants or thefromString(String)factory method.Creates a new instance ofHttpHeaderNamewithout aExpandableStringEnum.toString()value.This constructor shouldn't be called as it will produce a
HttpHeaderNamewhich doesn't have a String enum value.
-
-
Method Details
-
getCaseSensitiveName
Gets the HTTP header name based on the name passed intofromString(String).- Returns:
- The HTTP header name based on the construction of this
HttpHeaderName.
-
getCaseInsensitiveName
Gets the HTTP header name lower cased.- Returns:
- The HTTP header name lower cased.
-
fromString
- Parameters:
name- The name.- Returns:
- The HttpHeaderName of the passed name, or null if name was null.
-
hashCode
public int hashCode()- Overrides:
hashCodein classExpandableStringEnum<HttpHeaderName>
-
equals
- Overrides:
equalsin classExpandableStringEnum<HttpHeaderName>
-
fromString(String)factory method.