| Constructor and Description |
|---|
HttpHeaders()
Create new empty
HttpHeaders. |
| Modifier and Type | Method and Description |
|---|---|
void |
add(String name,
String value)
Adds the given value to the list of headers for the given name.
|
void |
clear() |
boolean |
containsKey(Object name) |
boolean |
containsValue(Object value) |
static HttpHeaders |
copyOf(Map<String,List<String>> headers)
Creates HTTP headers.
|
Set<Map.Entry<String,List<String>>> |
entrySet() |
boolean |
equals(Object o) |
List<String> |
get(Object name) |
Optional<String> |
getFirst(String name)
Gets a first header value.
|
int |
hashCode() |
boolean |
isEmpty() |
Set<String> |
keySet() |
List<String> |
put(String name,
List<String> values) |
void |
putAll(Map<? extends String,? extends List<String>> headers) |
static HttpHeaders |
readOnly(Map<String,List<String>> headers)
Creates read-only HTTP headers.
|
List<String> |
remove(Object name) |
void |
set(String name,
String value)
Sets the given value as the sole header value for the given name.
|
int |
size() |
String |
toString() |
Collection<List<String>> |
values() |
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic HttpHeaders()
HttpHeaders.public static HttpHeaders readOnly(Map<String,List<String>> headers)
headers - the headers for which read-only view is to be returned.public static HttpHeaders copyOf(Map<String,List<String>> headers)
headers - the headers to copy frompublic boolean containsKey(Object name)
containsKey in interface Map<String,List<String>>public boolean containsValue(Object value)
containsValue in interface Map<String,List<String>>public Optional<String> getFirst(String name)
name - the header namepublic void add(String name, String value)
name - the header namevalue - the header valuepublic void set(String name, String value)
name - the header namevalue - the header value to set.public Collection<List<String>> values()
public boolean equals(Object o)
public int hashCode()
Copyright © 2023. All rights reserved.