Uses of Class
io.helidon.common.http.MediaType
Packages that use MediaType
Package
Description
HTTP APIs and implementations usable by both server and client side of the HTTP story.
Common classes for accessing JSON based REST APIs of third party systems.
Common classes for processing content with a specific
MediaType.Helidon Media MultiPart.
Helidon SE OpenAPI Support.
A reactive client for rest calls.
Reactive web server API.
Static content support for Helidon
WebServer.-
Uses of MediaType in io.helidon.common.http
Fields in io.helidon.common.http declared as MediaTypeModifier and TypeFieldDescriptionstatic final MediaTypeMediaType.APPLICATION_ATOM_XMLAMediaTypeconstant representingapplication/atom+xmlmedia type.static final MediaTypeMediaType.APPLICATION_FORM_URLENCODEDAMediaTypeconstant representingapplication/x-www-form-urlencodedmedia type.static final MediaTypeMediaType.APPLICATION_JAVASCRIPTAMediaTypeconstant representingapplication/javascriptmedia type.static final MediaTypeMediaType.APPLICATION_JSONAMediaTypeconstant representingapplication/jsonmedia type.static final MediaTypeMediaType.APPLICATION_OCTET_STREAMAMediaTypeconstant representingapplication/octet-streammedia type.static final MediaTypeMediaType.APPLICATION_OPENAPI_JSONAMediaTypeconstant representing OpenAPI json.static final MediaTypeMediaType.APPLICATION_OPENAPI_YAMLAMediaTypeconstant representing OpenAPI yaml.static final MediaTypeMediaType.APPLICATION_STREAM_JSONAMediaTypeconstant representingapplication/stream+jsonmedia type.static final MediaTypeMediaType.APPLICATION_SVG_XMLAMediaTypeconstant representingapplication/svg+xmlmedia type.static final MediaTypeMediaType.APPLICATION_X_NDJSONAMediaTypeconstant representingapplication/x-ndjsonmedia type.static final MediaTypeMediaType.APPLICATION_X_YAMLAMediaTypeconstant representing "x" YAML as application.static final MediaTypeMediaType.APPLICATION_XHTML_XMLAMediaTypeconstant representingapplication/xhtml+xmlmedia type.static final MediaTypeMediaType.APPLICATION_XMLAMediaTypeconstant representingapplication/xmlmedia type.static final MediaTypeMediaType.APPLICATION_YAMLAMediaTypeconstant representing pseudo-registered YAML.static final MediaTypeMediaType.MULTIPART_FORM_DATAAMediaTypeconstant representingmultipart/form-datamedia type.static final MediaTypeMediaType.TEXT_EVENT_STREAMAMediaTypeconstant representingtext/event-streammedia type.static final MediaTypeMediaType.TEXT_HTMLAMediaTypeconstant representingtext/htmlmedia type.static final MediaTypeMediaType.TEXT_PLAINAMediaTypeconstant representingtext/plainmedia type.static final MediaTypeMediaType.TEXT_X_YAMLAMediaTypeconstant representing "x" YAML as text.static final MediaTypeMediaType.TEXT_XMLAMediaTypeconstant representingtext/xmlmedia type.static final MediaTypeMediaType.TEXT_YAMLAMediaTypeconstant representing pseudo-registered YAML as text.static final MediaTypeMediaType.WILDCARDAMediaTypeconstant representing wildcard media type.Fields in io.helidon.common.http with type parameters of type MediaTypeModifier and TypeFieldDescriptionMediaType.JSON_EVENT_STREAM_PREDICATEPredicate to test ifMediaTypeistext/event-streamwithout any parameter or with parameter "element-type".MediaType.JSON_PREDICATEMediaType.XML_PREDICATEMethods in io.helidon.common.http that return MediaTypeModifier and TypeMethodDescriptionMediaType.Builder.build()static MediaTypeCreates a new instance ofMediaTypewith the supplied type and subtype.static MediaTypeParses a media type from its string representation.MediaType.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 -
Uses of MediaType in io.helidon.integrations.common.rest
Methods in io.helidon.integrations.common.rest that return types with arguments of type MediaTypeModifier and TypeMethodDescriptionApiJsonRequest.requestMediaType()ApiRequest.requestMediaType()Request media type.ApiRestRequest.requestMediaType()ApiJsonRequest.responseMediaType()ApiRequest.responseMediaType()Response media type.ApiRestRequest.responseMediaType()Methods in io.helidon.integrations.common.rest with parameters of type MediaTypeModifier and TypeMethodDescriptionApiJsonRequest.requestMediaType(MediaType mediaType) ApiRequest.requestMediaType(MediaType mediaType) The media type header, defaults toAPPLICATION_JSONwhen JSON entity is present, toAPPLICATION_OCTET_STREAMfor publisher base requests, empty otherwise.ApiRestRequest.requestMediaType(MediaType mediaType) ApiJsonRequest.responseMediaType(MediaType mediaType) ApiRequest.responseMediaType(MediaType mediaType) The accept header, defaults toAPPLICATION_JSONfor most requests, except for requests that return publisher, which default toAPPLICATION_OCTET_STREAM.ApiRestRequest.responseMediaType(MediaType mediaType) -
Uses of MediaType in io.helidon.media.common
Methods in io.helidon.media.common that return MediaTypeModifier and TypeMethodDescriptionMessageBodyWriterContext.findAccepted(MediaType mediaType) Find the given media type in the inboundAcceptheader.MessageBodyWriterContext.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 MediaTypeModifier and TypeMethodDescriptionMessageBodyWriterContext.acceptedTypes()Get the inboundAcceptheader.MessageBodyReaderContext.contentType()Get theContent-Typeheader.MessageBodyWriterContext.contentType()Get theContent-Typeheader.Methods in io.helidon.media.common with parameters of type MediaTypeModifier and TypeMethodDescriptionvoidMessageBodyWriterContext.contentType(MediaType contentType) Set theContent-Typeheader value in the underlying headers if not present.MessageBodyWriterContext.findAccepted(MediaType mediaType) Find the given media type in the inboundAcceptheader.MessageBodyWriterContext.findAccepted(Predicate<MediaType> predicate, MediaType defaultType) Find an media type in the inboundAcceptheader with the given predicate and default value.MessageBodyWriterContext.registerWriter(Class<T> type, MediaType contentType, Function<? extends T, Flow.Publisher<DataChunk>> function) Deprecated.since 2.0.0, useMessageBodyWriterContext.registerWriter(MessageBodyWriter)insteadMessageBodyWriterContext.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 MediaTypeModifier and TypeMethodDescriptionstatic 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.MessageBodyWriterContext.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 MediaTypeModifier and TypeMethodDescriptionBodyPartHeaders.contentType()Get theContent-Typeheader.ReadableBodyPartHeaders.contentType()WriteableBodyPartHeaders.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 MediaTypeModifier and TypeMethodDescriptionWriteableBodyPartHeaders.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 MediaTypeModifier and TypeFieldDescriptionstatic final 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 MediaTypeModifier and TypeMethodDescriptionWebClientRequestHeaders.contentType()Returns content type of the request.Methods in io.helidon.webclient that return types with arguments of type MediaTypeModifier and TypeMethodDescriptionWebClientRequestHeaders.acceptedTypes()Returns a list of acceptedTypes ("Accept" header) content types in quality factor order.WebClientResponseHeaders.contentType()Returns content type of the response.Methods in io.helidon.webclient with parameters of type MediaTypeModifier and TypeMethodDescriptionMedia types which are accepted in the response.Add acceptedMediaType.WebClientRequestBuilder.contentType(MediaType contentType) Content type of the request.WebClientRequestHeaders.contentType(MediaType contentType) Set a content type. -
Uses of MediaType in io.helidon.webserver
Methods in io.helidon.webserver that return MediaTypeModifier and TypeMethodDescriptionprotected 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 MediaTypeModifier and TypeMethodDescriptionRequestHeaders.acceptedTypes()Returns a list of acceptedTypes ("Accept" header) content types in quality factor order.ResponseHeaders.acceptPatches()Gets immutable list of supported patch document formats (header "Accept-Patch").RequestHeaders.bestAccepted(MediaType... mediaTypes) Optionally returns a single media type from the given media types that is the best one accepted by the client.RequestHeaders.contentType()Optionally returns the MIME type of the body of the request.ResponseHeaders.contentType()Optionally gets the MIME type of the response body.Methods in io.helidon.webserver with parameters of type MediaTypeModifier and TypeMethodDescriptionOnly 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").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.Builder.contentType(String filenameExtension, MediaType contentType) Maps a filename extension to the response content type.RequestPredicate.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. -
Uses of MediaType in io.helidon.webserver.staticcontent
Methods in io.helidon.webserver.staticcontent with parameters of type MediaTypeModifier and TypeMethodDescriptionStaticContentSupport.FileBasedBuilder.contentType(String filenameExtension, MediaType contentType) Maps a filename extension to the response content type.
FormParams.builder()instead or registerio.helidon.media.common.FormParamsBodyReader