Usage

A type is provided to represent the values of each header field. These types implement the HeaderFieldElement interface. A parser is also provided for each header field that can convert the string representation of the header to the structured representation. These parsers implement the HeaderParser interface taking the HeaderFieldElement type they return as a type parameter.

Some types are used by both the request and response headers in different header fields. Many values in the headers have quality values associated with them. These implement the Qualified interface, which supports a double value as the quality value. A comparator is provided for these types that allows qualified values to be compared against each other.

The header fields currently supported are:

  • Accept
  • Accept-Encoding
  • Accept-Language
  • Content-Encoding
  • Content-Language
  • Content-Type