getAccept method

List<MediaType> getAccept()
  • Return the list of acceptable MediaType media types,
    • as specified by the Accept header.
    • Returns an empty list when the acceptable media types are unspecified.

Implementation

List<MediaType> getAccept() {
	String value = getFirst(HttpHeaders.ACCEPT);
	List<MediaType> result = (value != null ? MediaType.parseMediaTypes(value) : new List());

	return result;
}