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.media.common Common classes for processing content with a specificMediaType.io.helidon.media.multipart Helidon Media MultiPart.io.helidon.openapi Helidon SE OpenAPI Support.io.helidon.webclient A reactive client for rest calls.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_STREAM_JSONAMediaTypeconstant representingapplication/stream+jsonmedia type.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.media.common
Methods in io.helidon.media.common that return MediaType Modifier and Type Method Description MediaTypeMessageBodyWriterContext. findAccepted(MediaType mediaType)Find the given media type in the inboundAcceptheader.MediaTypeMessageBodyWriterContext. findAccepted(Predicate<MediaType> predicate, MediaType defaultType)Find an media type in the inboundAcceptheader with the given predicate and default value.Methods in io.helidon.media.common that return types with arguments of type MediaType Modifier and Type Method Description List<MediaType>MessageBodyWriterContext. acceptedTypes()Get the inboundAcceptheader.Optional<MediaType>MessageBodyReaderContext. contentType()Get theContent-Typeheader.Optional<MediaType>MessageBodyWriterContext. contentType()Get theContent-Typeheader.Methods in io.helidon.media.common with parameters of type MediaType Modifier and Type Method Description voidMessageBodyWriterContext. contentType(MediaType contentType)Set theContent-Typeheader value in the underlying headers if not present.MediaTypeMessageBodyWriterContext. findAccepted(MediaType mediaType)Find the given media type in the inboundAcceptheader.MediaTypeMessageBodyWriterContext. findAccepted(Predicate<MediaType> predicate, MediaType defaultType)Find an media type in the inboundAcceptheader with the given predicate and default value.<T> MessageBodyWriterContextMessageBodyWriterContext. registerWriter(Class<T> type, MediaType contentType, Function<? extends T,Flow.Publisher<DataChunk>> function)Deprecated.since 2.0.0, useMessageBodyWriterContext.registerWriter(MessageBodyWriter)instead<T> MessageBodyWriterContextMessageBodyWriterContext. registerWriter(Predicate<?> accept, MediaType contentType, Function<T,Flow.Publisher<DataChunk>> function)Deprecated.since 2.0.0, useMessageBodyWriterContext.registerWriter(MessageBodyWriter)insteadMethod parameters in io.helidon.media.common with type arguments of type MediaType Modifier and Type Method Description static MessageBodyReaderContextMessageBodyReaderContext. create(MediaContext mediaContext, MessageBodyContext.EventListener eventListener, ReadOnlyParameters headers, Optional<MediaType> contentType)Create a new empty reader context backed by the specified headers.static MessageBodyReaderContextMessageBodyReaderContext. create(MessageBodyReaderContext parent, MessageBodyContext.EventListener eventListener, ReadOnlyParameters headers, Optional<MediaType> contentType)Create a new empty reader context backed by the specified headers.static MessageBodyWriterContextMessageBodyWriterContext. create(MediaContext mediaContext, MessageBodyContext.EventListener eventListener, Parameters headers, List<MediaType> acceptedTypes)Create a new writer context.static MessageBodyWriterContextMessageBodyWriterContext. create(MessageBodyWriterContext parent, MessageBodyContext.EventListener eventListener, Parameters headers, List<MediaType> acceptedTypes)Create a new writer context.MediaTypeMessageBodyWriterContext. findAccepted(Predicate<MediaType> predicate, MediaType defaultType)Find an media type in the inboundAcceptheader with the given predicate and default value. -
Uses of MediaType in io.helidon.media.multipart
Methods in io.helidon.media.multipart that return MediaType Modifier and Type Method Description MediaTypeBodyPartHeaders. contentType()Get theContent-Typeheader.MediaTypeReadableBodyPartHeaders. contentType()MediaTypeWriteableBodyPartHeaders. contentType()default MediaTypeBodyPartHeaders. defaultContentType()Returns the defaultContent-Typeheader value:APPLICATION_OCTET_STREAMif theContent-Dispositionheader is present with a non empty value, otherwiseTEXT_PLAIN.Methods in io.helidon.media.multipart with parameters of type MediaType Modifier and Type Method Description WriteableBodyPartHeaders.BuilderWriteableBodyPartHeaders.Builder. contentType(MediaType contentType)Add aContent-Typeheader.voidWriteableBodyPartHeaders. contentType(MediaType contentType)Sets the MIME type of the body part. -
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.webclient
Methods in io.helidon.webclient that return MediaType Modifier and Type Method Description MediaTypeWebClientRequestHeaders. contentType()Returns content type of the request.Methods in io.helidon.webclient that return types with arguments of type MediaType Modifier and Type Method Description List<MediaType>WebClientRequestHeaders. acceptedTypes()Returns a list of acceptedTypes ("Accept" header) content types in quality factor order.Optional<MediaType>WebClientResponseHeaders. contentType()Returns content type of the response.Methods in io.helidon.webclient with parameters of type MediaType Modifier and Type Method Description WebClientRequestBuilderWebClientRequestBuilder. accept(MediaType... mediaTypes)Media types which are accepted in the response.WebClientRequestHeadersWebClientRequestHeaders. addAccept(MediaType mediaType)Add acceptedMediaType.WebClientRequestBuilderWebClientRequestBuilder. contentType(MediaType contentType)Content type of the request.WebClientRequestHeadersWebClientRequestHeaders. contentType(MediaType contentType)Set a content type. -
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)Deprecated.since 2.0.0, useServerResponse.registerWriter(io.helidon.media.common.MessageBodyWriter)instead<T> ServerResponseServerResponse. registerWriter(Predicate<?> accept, MediaType contentType, Function<T,Flow.Publisher<DataChunk>> function)Deprecated.since 2.0.0, useServerResponse.registerWriter(io.helidon.media.common.MessageBodyWriter)insteadprotected MediaTypeJsonService. toJsonResponseType(MediaType acceptedType)Returns the response type for the given type if it is an accepted JSON type.
-