Example usage for Java org.springframework.http HttpHeaders fields, constructors, methods, implement or subclass
The text is from its open source code.
String | ACCEPT The HTTP Accept header field name. |
String | ACCEPT_ENCODING The HTTP Accept-Encoding header field name. |
String | ACCEPT_RANGES The HTTP Accept-Ranges header field name. |
String | ACCESS_CONTROL_ALLOW_METHODS The CORS Access-Control-Allow-Methods response header field name. |
String | ACCESS_CONTROL_ALLOW_ORIGIN The CORS Access-Control-Allow-Origin response header field name. |
String | ACCESS_CONTROL_REQUEST_HEADERS The CORS Access-Control-Request-Headers request header field name. |
String | ACCESS_CONTROL_REQUEST_METHOD The CORS Access-Control-Request-Method request header field name. |
String | ALLOW The HTTP Allow header field name. |
String | AUTHORIZATION The HTTP Authorization header field name. |
String | CACHE_CONTROL The HTTP Cache-Control header field name. |
String | CONNECTION The HTTP Connection header field name. |
String | CONTENT_ENCODING The HTTP Content-Encoding header field name. |
String | CONTENT_DISPOSITION The HTTP Content-Disposition header field name. |
String | CONTENT_LANGUAGE The HTTP Content-Language header field name. |
String | CONTENT_LENGTH The HTTP Content-Length header field name. |
String | CONTENT_RANGE The HTTP Content-Range header field name. |
String | CONTENT_TYPE The HTTP Content-Type header field name. |
String | COOKIE The HTTP Cookie header field name. |
String | ETAG The HTTP ETag header field name. |
String | EXPIRES The HTTP Expires header field name. |
String | HOST The HTTP Host header field name. |
String | IF_MATCH The HTTP If-Match header field name. |
String | IF_MODIFIED_SINCE The HTTP If-Modified-Since header field name. |
String | IF_NONE_MATCH The HTTP If-None-Match header field name. |
String | IF_RANGE The HTTP If-Range header field name. |
String | IF_UNMODIFIED_SINCE The HTTP If-Unmodified-Since header field name. |
String | LAST_MODIFIED The HTTP Last-Modified header field name. |
String | LOCATION The HTTP Location header field name. |
String | ORIGIN The HTTP Origin header field name. |
String | PRAGMA The HTTP Pragma header field name. |
String | RANGE The HTTP Range header field name. |
String | REFERER The HTTP Referer header field name. |
String | SERVER The HTTP Server header field name. |
String | SET_COOKIE The HTTP Set-Cookie header field name. |
String | TRANSFER_ENCODING The HTTP Transfer-Encoding header field name. |
String | USER_AGENT The HTTP User-Agent header field name. |
String | VARY The HTTP Vary header field name. |
String | WARNING The HTTP Warning header field name. |
String | WWW_AUTHENTICATE The HTTP WWW-Authenticate header field name. |
HttpHeaders() Construct a new, empty instance of the HttpHeaders object. |
void | add(String headerName, @Nullable String headerValue) Add the given, single header value under the given name. |
void | addAll(String key, List extends String> values) |
void | clear() |
boolean | containsKey(Object key) |
Set | entrySet() |
void | forEach(BiConsumer super K, ? super V> action) Performs the given action for each entry in this map until all entries have been processed or the action throws an exception. |
List | get(Object key) |
List | getAccept() Return the list of acceptable MediaType media types , as specified by the Accept header. |
List | getAcceptCharset() Return the list of acceptable Charset charsets , as specified by the Accept-Charset header. |
List | getAccessControlRequestHeaders() Return the value of the Access-Control-Request-Headers request header. |
Set | getAllow() Return the set of allowed HttpMethod HTTP methods , as specified by the Allow header. |
String | getCacheControl() Return the value of the Cache-Control header. |
List | getConnection() Return the value of the Connection header. |
ContentDisposition | getContentDisposition() Return a parsed representation of the Content-Disposition header. |
long | getContentLength() Return the length of the body in bytes, as specified by the Content-Length header. |
MediaType | getContentType() Return the MediaType media type of the body, as specified by the Content-Type header. |
long | getDate() Return the date and time at which the message was created, as specified by the Date header. |
String | getETag() Return the entity tag of the body, as specified by the ETag header. |
long | getExpires() Return the date and time at which the message is no longer valid, as specified by the Expires header. |
String | getFirst(String headerName) Return the first header value for the given header name, if any. |
long | getIfModifiedSince() Return the value of the If-Modified-Since header. |
List | getIfNoneMatch() Return the value of the If-None-Match header. |
long | getLastModified() Return the time the resource was last changed, as specified by the Last-Modified header. |
URI | getLocation() Return the (new) location of a resource as specified by the Location header. |
String | getPragma() Return the value of the Pragma header. |
String | getUpgrade() Return the value of the Upgrade header. |
List | getValuesAsList(String headerName) Return all values of a given header name, even if this header is set multiple times. |
boolean | isEmpty() |
Set | keySet() |
List | put(String key, List |
void | putAll(Map extends String, ? extends List |
HttpHeaders | readOnlyHttpHeaders(HttpHeaders headers) Return an HttpHeaders object that can only be read, not written to. |
List | remove(Object key) |
void | set(String headerName, @Nullable String headerValue) Set the given, single header value under the given name. |
void | setAccept(List Set the list of acceptable MediaType media types , as specified by the Accept header. |
void | setAcceptCharset(List Set the list of acceptable Charset charsets , as specified by the Accept-Charset header. |
void | setAccessControlAllowCredentials(boolean allowCredentials) Set the (new) value of the Access-Control-Allow-Credentials response header. |
void | setAccessControlAllowHeaders(List Set the (new) value of the Access-Control-Allow-Headers response header. |
void | setAccessControlAllowMethods(List Set the (new) value of the Access-Control-Allow-Methods response header. |
void | setAccessControlAllowOrigin(@Nullable String allowedOrigin) Set the (new) value of the Access-Control-Allow-Origin response header. |
void | setAccessControlExposeHeaders(List Set the (new) value of the Access-Control-Expose-Headers response header. |
void | setAccessControlMaxAge(Duration maxAge) Set the (new) value of the Access-Control-Max-Age response header. |
void | setAccessControlMaxAge(long maxAge) Set the (new) value of the Access-Control-Max-Age response header. |
void | setAllow(Set Set the set of allowed HttpMethod HTTP methods , as specified by the Allow header. |
void | setCacheControl(CacheControl cacheControl) Set a configured CacheControl instance as the new value of the Cache-Control header. |
void | setCacheControl(@Nullable String cacheControl) Set the (new) value of the Cache-Control header. |
void | setConnection(String connection) Set the (new) value of the Connection header. |
void | setConnection(List Set the (new) value of the Connection header. |
void | setContentDispositionFormData(String name, @Nullable String filename) Set the Content-Disposition header when creating a "multipart/form-data" request. |
void | setContentLength(long contentLength) Set the length of the body in bytes, as specified by the Content-Length header. |
void | setContentType(@Nullable MediaType mediaType) Set the MediaType media type of the body, as specified by the Content-Type header. |
void | setDate(ZonedDateTime date) Set the date and time at which the message was created, as specified by the Date header. |
void | setDate(Instant date) Set the date and time at which the message was created, as specified by the Date header. |
void | setDate(long date) Set the date and time at which the message was created, as specified by the Date header. |
void | setETag(@Nullable String etag) Set the (new) entity tag of the body, as specified by the ETag header. |
void | setExpires(ZonedDateTime expires) Set the duration after which the message is no longer valid, as specified by the Expires header. |
void | setExpires(Instant expires) Set the date and time at which the message is no longer valid, as specified by the Expires header. |
void | setExpires(long expires) Set the date and time at which the message is no longer valid, as specified by the Expires header. |
void | setIfModifiedSince(ZonedDateTime ifModifiedSince) Set the time the resource was last changed, as specified by the Last-Modified header. |
void | setIfModifiedSince(Instant ifModifiedSince) Set the time the resource was last changed, as specified by the Last-Modified header. |
void | setIfModifiedSince(long ifModifiedSince) Set the (new) value of the If-Modified-Since header. |
void | setIfNoneMatch(String ifNoneMatch) Set the (new) value of the If-None-Match header. |
void | setIfNoneMatch(List Set the (new) values of the If-None-Match header. |
void | setLastModified(ZonedDateTime lastModified) Set the time the resource was last changed, as specified by the Last-Modified header. |
void | setLastModified(Instant lastModified) Set the time the resource was last changed, as specified by the Last-Modified header. |
void | setLastModified(long lastModified) Set the time the resource was last changed, as specified by the Last-Modified header. |
void | setLocation(@Nullable URI location) Set the (new) location of a resource, as specified by the Location header. |
void | setOrigin(@Nullable String origin) Set the (new) value of the Origin header. |
void | setPragma(@Nullable String pragma) Set the (new) value of the Pragma header. |
void | setUpgrade(@Nullable String upgrade) Set the (new) value of the Upgrade header. |
int | size() |
Map | toSingleValueMap() |