Java org.springframework.http HttpHeaders fields, constructors, methods, implement or subclass

Example usage for Java org.springframework.http HttpHeaders fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.springframework.http HttpHeaders.

The text is from its open source code.

Subclass

org.springframework.http.HttpHeaders has subclasses.
Click this link to see all its subclasses.

Field

StringACCEPT
The HTTP Accept header field name.
StringACCEPT_ENCODING
The HTTP Accept-Encoding header field name.
StringACCEPT_RANGES
The HTTP Accept-Ranges header field name.
StringACCESS_CONTROL_ALLOW_METHODS
The CORS Access-Control-Allow-Methods response header field name.
StringACCESS_CONTROL_ALLOW_ORIGIN
The CORS Access-Control-Allow-Origin response header field name.
StringACCESS_CONTROL_REQUEST_HEADERS
The CORS Access-Control-Request-Headers request header field name.
StringACCESS_CONTROL_REQUEST_METHOD
The CORS Access-Control-Request-Method request header field name.
StringALLOW
The HTTP Allow header field name.
StringAUTHORIZATION
The HTTP Authorization header field name.
StringCACHE_CONTROL
The HTTP Cache-Control header field name.
StringCONNECTION
The HTTP Connection header field name.
StringCONTENT_ENCODING
The HTTP Content-Encoding header field name.
StringCONTENT_DISPOSITION
The HTTP Content-Disposition header field name.
StringCONTENT_LANGUAGE
The HTTP Content-Language header field name.
StringCONTENT_LENGTH
The HTTP Content-Length header field name.
StringCONTENT_RANGE
The HTTP Content-Range header field name.
StringCONTENT_TYPE
The HTTP Content-Type header field name.
StringCOOKIE
The HTTP Cookie header field name.
StringETAG
The HTTP ETag header field name.
StringEXPIRES
The HTTP Expires header field name.
StringHOST
The HTTP Host header field name.
StringIF_MATCH
The HTTP If-Match header field name.
StringIF_MODIFIED_SINCE
The HTTP If-Modified-Since header field name.
StringIF_NONE_MATCH
The HTTP If-None-Match header field name.
StringIF_RANGE
The HTTP If-Range header field name.
StringIF_UNMODIFIED_SINCE
The HTTP If-Unmodified-Since header field name.
StringLAST_MODIFIED
The HTTP Last-Modified header field name.
StringLOCATION
The HTTP Location header field name.
StringORIGIN
The HTTP Origin header field name.
StringPRAGMA
The HTTP Pragma header field name.
StringRANGE
The HTTP Range header field name.
StringREFERER
The HTTP Referer header field name.
StringSERVER
The HTTP Server header field name.
StringSET_COOKIE
The HTTP Set-Cookie header field name.
StringTRANSFER_ENCODING
The HTTP Transfer-Encoding header field name.
StringUSER_AGENT
The HTTP User-Agent header field name.
StringVARY
The HTTP Vary header field name.
StringWARNING
The HTTP Warning header field name.
StringWWW_AUTHENTICATE
The HTTP WWW-Authenticate header field name.

Constructor

HttpHeaders()
Construct a new, empty instance of the HttpHeaders object.

Method

voidadd(String headerName, @Nullable String headerValue)
Add the given, single header value under the given name.
voidaddAll(String key, List values)
voidclear()
booleancontainsKey(Object key)
Set>>entrySet()
voidforEach(BiConsumer action)
Performs the given action for each entry in this map until all entries have been processed or the action throws an exception.
Listget(Object key)
ListgetAccept()
Return the list of acceptable MediaType media types , as specified by the Accept header.
ListgetAcceptCharset()
Return the list of acceptable Charset charsets , as specified by the Accept-Charset header.
ListgetAccessControlRequestHeaders()
Return the value of the Access-Control-Request-Headers request header.
SetgetAllow()
Return the set of allowed HttpMethod HTTP methods , as specified by the Allow header.
StringgetCacheControl()
Return the value of the Cache-Control header.
ListgetConnection()
Return the value of the Connection header.
ContentDispositiongetContentDisposition()
Return a parsed representation of the Content-Disposition header.
longgetContentLength()
Return the length of the body in bytes, as specified by the Content-Length header.
MediaTypegetContentType()
Return the MediaType media type of the body, as specified by the Content-Type header.
longgetDate()
Return the date and time at which the message was created, as specified by the Date header.
StringgetETag()
Return the entity tag of the body, as specified by the ETag header.
longgetExpires()
Return the date and time at which the message is no longer valid, as specified by the Expires header.
StringgetFirst(String headerName)
Return the first header value for the given header name, if any.
longgetIfModifiedSince()
Return the value of the If-Modified-Since header.
ListgetIfNoneMatch()
Return the value of the If-None-Match header.
longgetLastModified()
Return the time the resource was last changed, as specified by the Last-Modified header.
URIgetLocation()
Return the (new) location of a resource as specified by the Location header.
StringgetPragma()
Return the value of the Pragma header.
StringgetUpgrade()
Return the value of the Upgrade header.
ListgetValuesAsList(String headerName)
Return all values of a given header name, even if this header is set multiple times.
booleanisEmpty()
SetkeySet()
Listput(String key, List value)
voidputAll(Map> map)
HttpHeadersreadOnlyHttpHeaders(HttpHeaders headers)
Return an HttpHeaders object that can only be read, not written to.
Listremove(Object key)
voidset(String headerName, @Nullable String headerValue)
Set the given, single header value under the given name.
voidsetAccept(List acceptableMediaTypes)
Set the list of acceptable MediaType media types , as specified by the Accept header.
voidsetAcceptCharset(List acceptableCharsets)
Set the list of acceptable Charset charsets , as specified by the Accept-Charset header.
voidsetAccessControlAllowCredentials(boolean allowCredentials)
Set the (new) value of the Access-Control-Allow-Credentials response header.
voidsetAccessControlAllowHeaders(List allowedHeaders)
Set the (new) value of the Access-Control-Allow-Headers response header.
voidsetAccessControlAllowMethods(List allowedMethods)
Set the (new) value of the Access-Control-Allow-Methods response header.
voidsetAccessControlAllowOrigin(@Nullable String allowedOrigin)
Set the (new) value of the Access-Control-Allow-Origin response header.
voidsetAccessControlExposeHeaders(List exposedHeaders)
Set the (new) value of the Access-Control-Expose-Headers response header.
voidsetAccessControlMaxAge(Duration maxAge)
Set the (new) value of the Access-Control-Max-Age response header.
voidsetAccessControlMaxAge(long maxAge)
Set the (new) value of the Access-Control-Max-Age response header.
voidsetAllow(Set allowedMethods)
Set the set of allowed HttpMethod HTTP methods , as specified by the Allow header.
voidsetCacheControl(CacheControl cacheControl)
Set a configured CacheControl instance as the new value of the Cache-Control header.
voidsetCacheControl(@Nullable String cacheControl)
Set the (new) value of the Cache-Control header.
voidsetConnection(String connection)
Set the (new) value of the Connection header.
voidsetConnection(List connection)
Set the (new) value of the Connection header.
voidsetContentDispositionFormData(String name, @Nullable String filename)
Set the Content-Disposition header when creating a "multipart/form-data" request.
voidsetContentLength(long contentLength)
Set the length of the body in bytes, as specified by the Content-Length header.
voidsetContentType(@Nullable MediaType mediaType)
Set the MediaType media type of the body, as specified by the Content-Type header.
voidsetDate(ZonedDateTime date)
Set the date and time at which the message was created, as specified by the Date header.
voidsetDate(Instant date)
Set the date and time at which the message was created, as specified by the Date header.
voidsetDate(long date)
Set the date and time at which the message was created, as specified by the Date header.
voidsetETag(@Nullable String etag)
Set the (new) entity tag of the body, as specified by the ETag header.
voidsetExpires(ZonedDateTime expires)
Set the duration after which the message is no longer valid, as specified by the Expires header.
voidsetExpires(Instant expires)
Set the date and time at which the message is no longer valid, as specified by the Expires header.
voidsetExpires(long expires)
Set the date and time at which the message is no longer valid, as specified by the Expires header.
voidsetIfModifiedSince(ZonedDateTime ifModifiedSince)
Set the time the resource was last changed, as specified by the Last-Modified header.
voidsetIfModifiedSince(Instant ifModifiedSince)
Set the time the resource was last changed, as specified by the Last-Modified header.
voidsetIfModifiedSince(long ifModifiedSince)
Set the (new) value of the If-Modified-Since header.
voidsetIfNoneMatch(String ifNoneMatch)
Set the (new) value of the If-None-Match header.
voidsetIfNoneMatch(List ifNoneMatchList)
Set the (new) values of the If-None-Match header.
voidsetLastModified(ZonedDateTime lastModified)
Set the time the resource was last changed, as specified by the Last-Modified header.
voidsetLastModified(Instant lastModified)
Set the time the resource was last changed, as specified by the Last-Modified header.
voidsetLastModified(long lastModified)
Set the time the resource was last changed, as specified by the Last-Modified header.
voidsetLocation(@Nullable URI location)
Set the (new) location of a resource, as specified by the Location header.
voidsetOrigin(@Nullable String origin)
Set the (new) value of the Origin header.
voidsetPragma(@Nullable String pragma)
Set the (new) value of the Pragma header.
voidsetUpgrade(@Nullable String upgrade)
Set the (new) value of the Upgrade header.
intsize()
MaptoSingleValueMap()