All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.vertx.ext.web.ParsedHeaderValues Maven / Gradle / Ivy

There is a newer version: 5.0.0.CR1
Show newest version
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
  • *
* */ @VertxGen public interface ParsedHeaderValues { /** * @return List of MIME values in the {@code Accept} header */ List accept(); /** * @return List of charset values in the {@code Accept-Charset} header */ List acceptCharset(); /** * @return List of encofing values in the {@code Accept-Encoding} header */ List acceptEncoding(); /** * @return List of languages in the {@code Accept-Language} header */ List acceptLanguage(); /** * @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. *

* * @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 accepted, Collection in); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy