public static interface ServerRequest.Headers
ServerRequest.headers()| Modifier and Type | Method and Description | 
|---|---|
| List<MediaType> | accept()Get the list of acceptable media types, as specified by the  Acceptheader. | 
| List<Charset> | acceptCharset()Get the list of acceptable charsets, as specified by the
  Accept-Charsetheader. | 
| List<Locale.LanguageRange> | acceptLanguage()Get the list of acceptable languages, as specified by the
  Accept-Languageheader. | 
| HttpHeaders | asHttpHeaders()Get the headers as an instance of  HttpHeaders. | 
| OptionalLong | contentLength()Get the length of the body in bytes, as specified by the
  Content-Lengthheader. | 
| Optional<MediaType> | contentType()Get the media type of the body, as specified by the
  Content-Typeheader. | 
| List<String> | header(String headerName)Get the header value(s), if any, for the header of the given name. | 
| InetSocketAddress | host()Get the value of the  Hostheader, if available. | 
| List<HttpRange> | range()Get the value of the  Rangeheader. | 
List<MediaType> accept()
Accept
 header.
 Returns an empty list if the acceptable media types are unspecified.
List<Charset> acceptCharset()
Accept-Charset header.List<Locale.LanguageRange> acceptLanguage()
Accept-Language header.OptionalLong contentLength()
Content-Length header.Optional<MediaType> contentType()
Content-Type header.@Nullable InetSocketAddress host()
Host header, if available.
 If the header value does not contain a port, the
 port in the returned address will
 be 0.
List<HttpRange> range()
Range header.
 Returns an empty list when the range is unknown.
List<String> header(String headerName)
Returns an empty list if no header values are found.
headerName - the header nameHttpHeaders asHttpHeaders()
HttpHeaders.