Class HttpAcceptUtils

java.lang.Object
com.atlassian.oai.validator.util.HttpAcceptUtils

public final class HttpAcceptUtils extends Object
Utils for parsing a HTTP Accept header into a list of media types
  • Method Details

    • splitAcceptHeader

      public static List<String> splitAcceptHeader(@Nullable String acceptHeaderValue)
      Split the given header value into individual media types that can then be parsed as necessary.

      This implementation supports the presence of commas within parameters e.g. application/hal+json;charset=UTF-8, foo/bar; q="A,B,C"

      Parameters:
      acceptHeaderValue - The header to split.
      Returns:
      A list of media type strings from the accept header after splitting