Class UnsupportedMediaException

All Implemented Interfaces:
Serializable

public final class UnsupportedMediaException extends HttpStatusException
Exception thrown when the requested Content-Type is not supported.
Since:
4.6.0
Author:
Sergio del Amo
See Also:
  • Constructor Details

    • UnsupportedMediaException

      public UnsupportedMediaException(String contentType, Collection<String> acceptableContentTypes)
      Parameters:
      contentType - Requested Content Type
      acceptableContentTypes - Acceptable content types
  • Method Details

    • getContentType

      public String getContentType()
      Returns:
      Requested Content Type
    • getAcceptableContentTypes

      public Collection<String> getAcceptableContentTypes()
      Returns:
      Acceptable content types