blob: fc4b5d2602b320edd1c20ced4a5143da231df29d [file] [log] [blame]
\chapter{HTTP Header Support}
\label{headersupport}
The following table lists HTTP headers that are directly supported, either automatically by a \jaxrs\ implementation runtime or by an application using the \jaxrs\ API. Any request header may be obtained using \HttpHeaders, see section \ref{httpheaders}; response headers not listed here may set using the \ResponseBuilder\-\code{.header} method.
%\begin{center}
\begin{longtable}{|l|p{4.5in}|}
\hline
\bfseries Header & \bfseries Description \tabularnewline
\hline\hline\endhead
\code{Accept} & \raggedright Used by runtime when selecting a resource method, compared to value of \Produces\ annotation, see section \ref{declaring_method_capabilities}. \tabularnewline
\hline
\code{Accept-Charset} & \raggedright Processed by runtime if application uses \Request\code{.selectVariant} method, see section \ref{conneg_and_preconditions}. \tabularnewline
\hline
\code{Accept-Encoding} & \raggedright Processed by runtime if application uses \Request\code{.selectVariant} method, see section \ref{conneg_and_preconditions}. \tabularnewline
\hline
\code{Accept-Language} & \raggedright Processed by runtime if application uses \Request\code{.selectVariant} method, see section \ref{conneg_and_preconditions}. \tabularnewline
\hline
\code{Allow} & \raggedright Included in automatically generated 405 error responses (see section \ref{request_matching}) and automatically generated responses to OPTIONS requests (see section \ref{head_and_options}).\tabularnewline
\hline
\code{Authorization} & \raggedright Depends on container, information available via \SecurityContext, see section \ref{security_context}. \tabularnewline
\hline
\code{Cache-Control} & \raggedright See \code{CacheControl} class and \ResponseBuilder\code{.cacheControl} method. \tabularnewline
\hline
\code{Content-Encoding} & \raggedright Response header set by application using \Response\code{.ok} or \ResponseBuilder\code{.variant}. \tabularnewline
\hline
\code{Content-Language} & \raggedright Response header set by application using \Response\code{.ok}, \ResponseBuilder\code{.language}, or \ResponseBuilder\code{.variant}. \tabularnewline
\hline
\code{Content-Length} & \raggedright Processed automatically for requests, set automatically in responses if value is provided by the \MsgWrite\ used to serialize the response entity. \tabularnewline
\hline
\code{Content-Type} & \raggedright Request header used by runtime when selecting a resource method, compared to value of \Consumes\ annotation, see section \ref{declaring_method_capabilities}. Response header either set by application using \Response\code{.ok}, \ResponseBuilder\code{.type}, or \ResponseBuilder\code{.variant}, or set automatically by runtime (see section \ref{determine_response_type}).\tabularnewline
\hline
\code{Cookie} & \raggedright See \code{Cookie} class and \HttpHeaders\code{.getCookies} method. \tabularnewline
\hline
\code{Date} & \raggedright Included in responses automatically as per HTTP/1.1. \tabularnewline
\hline
\code{ETag} & \raggedright See \code{EntityTag} class, \Response\code{.notModified} method and \ResponseBuilder\code{.tag} method. \tabularnewline
\hline
\code{Expect} & \raggedright Depends on underlying container. \tabularnewline
\hline
\code{Expires} & \raggedright Set by application using the \ResponseBuilder\code{.expires} method. \tabularnewline
\hline
\code{If-Match} & \raggedright Processed by runtime if application uses corresponding \Request\code{.evaluatePreconditions} method, see section \ref{conneg_and_preconditions}. \tabularnewline
\hline
\code{If-Modified-Since} & \raggedright Processed by runtime if application uses corresponding \Request\code{.evaluatePreconditions} method, see section \ref{conneg_and_preconditions}. \tabularnewline
\hline
\code{If-None-Match} & \raggedright Processed by runtime if application uses corresponding \Request\code{.evaluatePreconditions} method, see section \ref{conneg_and_preconditions}. \tabularnewline
\hline
\code{If-Unmodified-Since} & \raggedright Processed by runtime if application uses corresponding \Request\code{.evaluatePreconditions} method, see section \ref{conneg_and_preconditions}. \tabularnewline
\hline
\code{Last-Modified} & \raggedright Set by application using the \ResponseBuilder\code{.lastModified} method. \tabularnewline
\hline
\code{Location} & \raggedright Set by application using the applicable \Response\ method or directly using the \ResponseBuilder\code{.location} method.\tabularnewline
\hline
\code{Set-Cookie} & \raggedright See \code{NewCookie} class and \ResponseBuilder\code{.cookie} method. \tabularnewline
\hline
\code{Transfer-Encoding} & \raggedright See section \ref{transfer_encoding}. \tabularnewline
\hline
\code{Vary} & \raggedright Set by application using \Response\code{.notAcceptable} method or \ResponseBuilder\code{.variants} method. \tabularnewline
\hline
\code{WWW-Authenticate} & \raggedright Depends on container. \tabularnewline
\hline
\end{longtable}
%\end{center}