package io.vertx.ext.web;

import io.vertx.codegen.annotations.GenIgnore;
import io.vertx.codegen.annotations.VertxGen;

import java.util.Collection;
import java.util.List;

A 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
/** * A container with the request's headers that are meaningful enough to be parsed * Contains: * <ul> * <li>Accept -> MIME header, parameters and sortable</li> * <li>Accept-Charset -> Parameters and sortable</li> * <li>Accept-Encoding -> Parameters and sortable</li> * <li>Accept-Language -> Parameters and sortable</li> * <li>Content-Type -> MIME header and parameters</li> * </ul> * */
@VertxGen public interface ParsedHeaderValues {
Returns:List of MIME values in the Accept header
/** * @return List of MIME values in the {@code Accept} header */
List<MIMEHeader> accept();
Returns:List of charset values in the Accept-Charset header
/** * @return List of charset values in the {@code Accept-Charset} header */
List<ParsedHeaderValue> acceptCharset();
Returns:List of encofing values in the Accept-Encoding header
/** * @return List of encofing values in the {@code Accept-Encoding} header */
List<ParsedHeaderValue> acceptEncoding();
Returns:List of languages in the Accept-Language header
/** * @return List of languages in the {@code Accept-Language} header */
List<LanguageHeader> acceptLanguage();
Returns:MIME value in the Content-Type header
/** * @return MIME value in the {@code Content-Type} header */
MIMEHeader contentType();
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.

Params:
  • 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
/** * 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. * <p> * <b>Note:</b> This method is intended for internal usage. * </p> * * @param accepted The sorted list of headers to find the best one. * @param in The headers to match against. * @return The first header that matched, otherwise empty if none matched */
@GenIgnore MIMEHeader findBestUserAcceptedIn(List<MIMEHeader> accepted, Collection<MIMEHeader> in); }