public class HeaderUtils extends Object
Utilities to deal with header values.
| Constructor and Description |
|---|
HeaderUtils() |
| Modifier and Type | Method and Description |
|---|---|
static com.google.common.base.Optional<List<String>> |
get(javax.ws.rs.core.MultivaluedMap<String,String> headers,
String name)
Returns the header values for the given header key.
|
static Optional<List<String>> |
getHeadersWithName(javax.ws.rs.core.MultivaluedMap<String,String> headers,
String name)
Returns the header values for the given header key.
|
static <T> T |
toValue(String headerName,
String value,
Class<T> clazz)
Deserialize a header value to its desired type if possible.
|
public static com.google.common.base.Optional<List<String>> get(javax.ws.rs.core.MultivaluedMap<String,String> headers, String name)
Returns the header values for the given header key.
headers - The header map.name - The header to get the value for.public static Optional<List<String>> getHeadersWithName(javax.ws.rs.core.MultivaluedMap<String,String> headers, String name)
Returns the header values for the given header key.
headers - The header map.name - The header to get the value for.Copyright © 2016–2022. All rights reserved.