Interface ServerRequest.Headers
- Enclosing interface:
- ServerRequest
public static interface ServerRequest.Headers
Represents the headers of the HTTP request.
- Since:
- 5.2
- Author:
- Arjen Poutsma
- See Also:
- 
Method SummaryModifier and TypeMethodDescriptionaccept()Get the list of acceptable media types, as specified by theAcceptheader.Get the list of acceptable charsets, as specified by theAccept-Charsetheader.Get the list of acceptable languages, as specified by theAccept-Languageheader.Get the headers as an instance ofHttpHeaders.Get the length of the body in bytes, as specified by theContent-Lengthheader.Get the media type of the body, as specified by theContent-Typeheader.firstHeader(String headerName) Get the first header value, if any, for the header for the given name.Get the header value(s), if any, for the header of the given name.host()Get the value of theHostheader, if available.range()Get the value of theRangeheader.
- 
Method Details- 
accept
- 
acceptCharset
- 
acceptLanguageList<Locale.LanguageRange> acceptLanguage()Get the list of acceptable languages, as specified by theAccept-Languageheader.
- 
contentLengthOptionalLong contentLength()Get the length of the body in bytes, as specified by theContent-Lengthheader.
- 
contentType
- 
host@Nullable InetSocketAddress host()Get the value of theHostheader, if available.If the header value does not contain a port, the port in the returned address will be 0.
- 
range
- 
header
- 
firstHeader
- 
asHttpHeadersHttpHeaders asHttpHeaders()Get the headers as an instance ofHttpHeaders.
 
-