public interface HttpHeaders
IllegalStateException
if called outside the
scope of a request (e.g. from a provider constructor).Context
Modifier and Type | Field and Description |
---|---|
static String |
ACCEPT
|
static String |
ACCEPT_CHARSET
|
static String |
ACCEPT_ENCODING
|
static String |
ACCEPT_LANGUAGE
|
static String |
ALLOW
|
static String |
AUTHORIZATION
|
static String |
CACHE_CONTROL
|
static String |
CONTENT_DISPOSITION
See IETF RFC-2183.
|
static String |
CONTENT_ENCODING
|
static String |
CONTENT_ID
See IETF RFC-2392.
|
static String |
CONTENT_LANGUAGE
|
static String |
CONTENT_LENGTH
|
static String |
CONTENT_LOCATION
|
static String |
CONTENT_TYPE
|
static String |
COOKIE
See IETF RFC 2109.
|
static String |
DATE
|
static String |
ETAG
|
static String |
EXPIRES
|
static String |
HOST
|
static String |
IF_MATCH
|
static String |
IF_MODIFIED_SINCE
|
static String |
IF_NONE_MATCH
|
static String |
IF_UNMODIFIED_SINCE
|
static String |
LAST_MODIFIED
|
static String |
LINK
|
static String |
LOCATION
|
static String |
RETRY_AFTER
|
static String |
SET_COOKIE
See IETF RFC 2109.
|
static String |
USER_AGENT
|
static String |
VARY
|
static String |
WWW_AUTHENTICATE
|
Modifier and Type | Method and Description |
---|---|
List<Locale> |
getAcceptableLanguages()
Get a list of languages that are acceptable for the response.
|
List<MediaType> |
getAcceptableMediaTypes()
Get a list of media types that are acceptable for the response.
|
Map<String,Cookie> |
getCookies()
Get any cookies that accompanied the request.
|
Date |
getDate()
Get message date.
|
String |
getHeaderString(String name)
Get a HTTP header as a single string value.
|
Locale |
getLanguage()
Get the language of the request entity.
|
int |
getLength()
Get Content-Length value.
|
MediaType |
getMediaType()
Get the media type of the request entity.
|
List<String> |
getRequestHeader(String name)
Get the values of a HTTP request header.
|
MultivaluedMap<String,String> |
getRequestHeaders()
Get the values of HTTP request headers.
|
static final String ACCEPT
static final String ACCEPT_CHARSET
static final String ACCEPT_ENCODING
static final String ACCEPT_LANGUAGE
static final String ALLOW
static final String AUTHORIZATION
static final String CACHE_CONTROL
static final String CONTENT_DISPOSITION
static final String CONTENT_ENCODING
static final String CONTENT_ID
static final String CONTENT_LANGUAGE
static final String CONTENT_LENGTH
static final String CONTENT_LOCATION
static final String CONTENT_TYPE
static final String DATE
static final String ETAG
static final String EXPIRES
static final String HOST
static final String IF_MATCH
static final String IF_MODIFIED_SINCE
static final String IF_NONE_MATCH
static final String IF_UNMODIFIED_SINCE
static final String LAST_MODIFIED
static final String LOCATION
static final String LINK
static final String RETRY_AFTER
static final String USER_AGENT
static final String VARY
static final String WWW_AUTHENTICATE
static final String COOKIE
static final String SET_COOKIE
List<String> getRequestHeader(String name)
getRequestHeaders().get(name)
.name
- the header name, case insensitive.IllegalStateException
- if called outside the scope of a request.String getHeaderString(String name)
RuntimeDelegate.HeaderDelegate
if one is available
via RuntimeDelegate.createHeaderDelegate(java.lang.Class)
for the header value class or using its toString
method if a header
delegate is not available.name
- the HTTP header.null
is returned. If the HTTP header is present but has no
value then the empty string is returned. If the HTTP header is present
more than once then the values of joined together and separated by a ','
character.getRequestHeader(java.lang.String)
MultivaluedMap<String,String> getRequestHeaders()
null
.IllegalStateException
- if called outside the scope of a request.List<MediaType> getAcceptableMediaTypes()
wildcard media type
instance is returned.IllegalStateException
- if called outside the scope of a request.List<Locale> getAcceptableLanguages()
Locale
instance (with language field
set to "*
") is returned.IllegalStateException
- if called outside the scope of a request.MediaType getMediaType()
null
if there is no request entity.IllegalStateException
- if called outside the scope of a request.Locale getLanguage()
null
if not specified.IllegalStateException
- if called outside the scope of a request.Map<String,Cookie> getCookies()
IllegalStateException
- if called outside the scope of a requestDate getDate()
null
if not present.int getLength()
Copyright © 1996-2013, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.