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