Package io.vertx.ext.web
Interface ParsedHeaderValues
-
public interface ParsedHeaderValuesA container with the request's headers that are meaningful enough to be parsed Contains:- Accept -> MIME header, parameters and sortable
- Accept-Charset -> Parameters and sortable
- Accept-Encoding -> Parameters and sortable
- Accept-Language -> Parameters and sortable
- Content-Type -> MIME header and parameters
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<MIMEHeader>accept()List<ParsedHeaderValue>acceptCharset()List<ParsedHeaderValue>acceptEncoding()List<LanguageHeader>acceptLanguage()MIMEHeadercontentType()MIMEHeaderfindBestUserAcceptedIn(List<MIMEHeader> accepted, Collection<MIMEHeader> in)Given the sorted list of parsed header values the user has sent and an Iterable of acceptable values: It finds the first accepted header that matches any inside the Iterable.
-
-
-
Method Detail
-
accept
List<MIMEHeader> accept()
- Returns:
- List of MIME values in the
Acceptheader
-
acceptCharset
List<ParsedHeaderValue> acceptCharset()
- Returns:
- List of charset values in the
Accept-Charsetheader
-
acceptEncoding
List<ParsedHeaderValue> acceptEncoding()
- Returns:
- List of encofing values in the
Accept-Encodingheader
-
acceptLanguage
List<LanguageHeader> acceptLanguage()
- Returns:
- List of languages in the
Accept-Languageheader
-
contentType
MIMEHeader contentType()
- Returns:
- MIME value in the
Content-Typeheader
-
findBestUserAcceptedIn
MIMEHeader findBestUserAcceptedIn(List<MIMEHeader> accepted, Collection<MIMEHeader> in)
Given the sorted list of parsed header values the user has sent and an Iterable of acceptable values: It finds the first accepted header that matches any inside the Iterable.Note: This method is intended for internal usage.
- Parameters:
accepted- The sorted list of headers to find the best one.in- The headers to match against.- Returns:
- The first header that matched, otherwise empty if none matched
-
-