| Constructor and Description |
|---|
Headers(Map<String,List<String>> headers) |
| Modifier and Type | Method and Description |
|---|---|
Http.Headers |
addHeader(String name,
List<String> values)
Add a new header with the given values.
|
Http.Headers |
addHeader(String name,
String value)
Add a new header with the given value.
|
play.api.mvc.Headers |
asScala() |
boolean |
contains(String headerName)
Checks if the given header is present.
|
Optional<String> |
get(String name)
Gets the header value.
|
List<String> |
getAll(String name)
Get all the values associated with the header name.
|
Http.Headers |
remove(String name)
Remove a header.
|
Map<String,List<String>> |
toMap() |
public boolean contains(String headerName)
headerName - The name of the header (case-insensitive)true if the request did contain the header.public Optional<String> get(String name)
name - the header namepublic List<String> getAll(String name)
name - the header name.public play.api.mvc.Headers asScala()
public Http.Headers addHeader(String name, String value)
name - the header namevalue - the header valuepublic Http.Headers addHeader(String name, List<String> values)
name - the header namevalues - the header valuespublic Http.Headers remove(String name)
name - the header name.