Uses of Class
io.helidon.common.http.MediaType
-
Packages that use MediaType Package Description io.helidon.common.http HTTP APIs and implementations usable by both server and client side of the HTTP story.io.helidon.openapi Helidon SE OpenAPI Support.io.helidon.webserver Reactive web server API. -
-
Uses of MediaType in io.helidon.common.http
Fields in io.helidon.common.http declared as MediaType Modifier and Type Field Description static MediaTypeMediaType. APPLICATION_ATOM_XMLAMediaTypeconstant representingapplication/atom+xmlmedia type.static MediaTypeMediaType. APPLICATION_FORM_URLENCODEDAMediaTypeconstant representingapplication/x-www-form-urlencodedmedia type.static MediaTypeMediaType. APPLICATION_JSONAMediaTypeconstant representingapplication/jsonmedia type.static MediaTypeMediaType. APPLICATION_OCTET_STREAMAMediaTypeconstant representingapplication/octet-streammedia type.static MediaTypeMediaType. APPLICATION_OPENAPI_JSONAMediaTypeconstant representing OpenAPI json.static MediaTypeMediaType. APPLICATION_OPENAPI_YAMLAMediaTypeconstant representing OpenAPI yaml.static MediaTypeMediaType. APPLICATION_SVG_XMLAMediaTypeconstant representingapplication/svg+xmlmedia type.static MediaTypeMediaType. APPLICATION_X_YAMLAMediaTypeconstant representing "x" YAML as application.static MediaTypeMediaType. APPLICATION_XHTML_XMLAMediaTypeconstant representingapplication/xhtml+xmlmedia type.static MediaTypeMediaType. APPLICATION_XMLAMediaTypeconstant representingapplication/xmlmedia type.static MediaTypeMediaType. APPLICATION_YAMLAMediaTypeconstant representing pseudo-registered YAML.static MediaTypeMediaType. MULTIPART_FORM_DATAAMediaTypeconstant representingmultipart/form-datamedia type.static MediaTypeMediaType. TEXT_HTMLAMediaTypeconstant representingtext/htmlmedia type.static MediaTypeMediaType. TEXT_PLAINAMediaTypeconstant representingtext/plainmedia type.static MediaTypeMediaType. TEXT_X_YAMLAMediaTypeconstant representing "x" YAML as text.static MediaTypeMediaType. TEXT_XMLAMediaTypeconstant representingtext/xmlmedia type.static MediaTypeMediaType. TEXT_YAMLAMediaTypeconstant representing pseudo-registered YAML as text.static MediaTypeMediaType. WILDCARDAMediaTypeconstant representing wildcard media type.Fields in io.helidon.common.http with type parameters of type MediaType Modifier and Type Field Description static Predicate<MediaType>MediaType. JSON_PREDICATEstatic Predicate<MediaType>MediaType. XML_PREDICATEMethods in io.helidon.common.http that return MediaType Modifier and Type Method Description MediaTypeMediaType.Builder. build()static MediaTypeMediaType. create(String type, String subtype)Creates a new instance ofMediaTypewith the supplied type and subtype.static MediaTypeMediaType. parse(String input)Parses a media type from its string representation.MediaTypeMediaType. withCharset(String charset)Create a newMediaTypeinstance with the same type, subtype and parameters copied from the original instance and the supplied "charset" parameter.Methods in io.helidon.common.http with parameters of type MediaType Modifier and Type Method Description static FormParamsFormParams. create(String paramAssignments, MediaType mediaType)Creates a newFormParamsinstance using the provided assignment string and media type.booleanMediaType. test(MediaType other)Check if this media type is compatible with another media type. -
Uses of MediaType in io.helidon.openapi
Fields in io.helidon.openapi declared as MediaType Modifier and Type Field Description static MediaTypeOpenAPISupport. DEFAULT_RESPONSE_MEDIA_TYPEDefault media type used in responses in absence of incoming Accept header. -
Uses of MediaType in io.helidon.webserver
Methods in io.helidon.webserver that return MediaType Modifier and Type Method Description protected MediaTypeJsonService. toJsonResponseType(MediaType acceptedType)Returns the response type for the given type if it is an accepted JSON type.Methods in io.helidon.webserver that return types with arguments of type MediaType Modifier and Type Method Description List<MediaType>RequestHeaders. acceptedTypes()Returns a list of acceptedTypes ("Accept" header) content types in quality factor order.List<MediaType>ResponseHeaders. acceptPatches()Gets immutable list of supported patch document formats (header "Accept-Patch").Optional<MediaType>RequestHeaders. bestAccepted(MediaType... mediaTypes)Optionally returns a single media type from the given media types that is the best one accepted by the client.Optional<MediaType>RequestHeaders. contentType()Optionally returns the MIME type of the body of the request.Optional<MediaType>ResponseHeaders. contentType()Optionally gets the MIME type of the response body.Methods in io.helidon.webserver with parameters of type MediaType Modifier and Type Method Description RequestPredicateRequestPredicate. accepts(MediaType... contentType)Only accept request that accepts any of the given content types.voidResponseHeaders. addAcceptPatches(MediaType... acceptableMediaTypes)Adds one or more acceptedTypes path document formats (header "Accept-Patch").Optional<MediaType>RequestHeaders. bestAccepted(MediaType... mediaTypes)Optionally returns a single media type from the given media types that is the best one accepted by the client.voidResponseHeaders. contentType(MediaType contentType)Sets the MIME type of the response body.StaticContentSupport.BuilderStaticContentSupport.Builder. contentType(String filenameExtension, MediaType contentType)Maps a filename extension to the response content type.RequestPredicateRequestPredicate. hasContentType(MediaType... contentType)Only accept requests with any of the given content types.booleanRequestHeaders. isAccepted(MediaType mediaType)Test if the given media type is acceptable as a response for this request.<T> ServerResponseServerResponse. registerWriter(Class<T> type, MediaType contentType, Function<? extends T,Flow.Publisher<DataChunk>> function)Registers a content writer for a given type and media type.<T> ServerResponseServerResponse. registerWriter(Predicate<?> accept, MediaType contentType, Function<T,Flow.Publisher<DataChunk>> function)Registers a content writer for all accepted contents.protected MediaTypeJsonService. toJsonResponseType(MediaType acceptedType)Returns the response type for the given type if it is an accepted JSON type.
-