Class MediaTypes
java.lang.Object
com.codename1.backend.web.MediaTypes
Media-type matching for a route's consumes and produces, called by the
generated router before it binds anything.
Type names are compared without case folding through toLowerCase, which is
locale sensitive; parameters (; charset=utf-8) are ignored, and either side
may use a * wildcard for the type or the subtype.
Internal to generated code.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanacceptable(String accept, String offered) Whether a request whoseAcceptheader isaccepttakes any ofoffered, a comma separated list; when it does not, the route answers 406.static booleanconsumable(String contentType, String accepted) Whether a request whoseContent-TypeiscontentTypemay reach a route that consumesaccepted, a comma separated list.
-
Method Details
-
consumable
-
acceptable
-