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 MediaType
MediaType.APPLICATION_ATOM_XML
AMediaType
constant representingapplication/atom+xml
media type.static final MediaType
MediaType.APPLICATION_FORM_URLENCODED
AMediaType
constant representingapplication/x-www-form-urlencoded
media type.static final MediaType
MediaType.APPLICATION_JAVASCRIPT
AMediaType
constant representingapplication/javascript
media type.static final MediaType
MediaType.APPLICATION_JSON
AMediaType
constant representingapplication/json
media type.static final MediaType
MediaType.APPLICATION_OCTET_STREAM
AMediaType
constant representingapplication/octet-stream
media type.static final MediaType
MediaType.APPLICATION_OPENAPI_JSON
AMediaType
constant representing OpenAPI json.static final MediaType
MediaType.APPLICATION_OPENAPI_YAML
AMediaType
constant representing OpenAPI yaml.static final MediaType
MediaType.APPLICATION_OPENMETRICS
AMediaType
constant representing theapplication/openmetrics-text
media type.static final MediaType
MediaType.APPLICATION_STREAM_JSON
AMediaType
constant representingapplication/stream+json
media type.static final MediaType
MediaType.APPLICATION_SVG_XML
AMediaType
constant representingapplication/svg+xml
media type.static final MediaType
MediaType.APPLICATION_X_NDJSON
AMediaType
constant representingapplication/x-ndjson
media type.static final MediaType
MediaType.APPLICATION_X_YAML
AMediaType
constant representing "x" YAML as application.static final MediaType
MediaType.APPLICATION_XHTML_XML
AMediaType
constant representingapplication/xhtml+xml
media type.static final MediaType
MediaType.APPLICATION_XML
AMediaType
constant representingapplication/xml
media type.static final MediaType
MediaType.APPLICATION_YAML
AMediaType
constant representing pseudo-registered YAML.static final MediaType
MediaType.MULTIPART_FORM_DATA
AMediaType
constant representingmultipart/form-data
media type.static final MediaType
MediaType.TEXT_EVENT_STREAM
AMediaType
constant representingtext/event-stream
media type.static final MediaType
MediaType.TEXT_HTML
AMediaType
constant representingtext/html
media type.static final MediaType
MediaType.TEXT_PLAIN
AMediaType
constant representingtext/plain
media type.static final MediaType
MediaType.TEXT_X_YAML
AMediaType
constant representing "x" YAML as text.static final MediaType
MediaType.TEXT_XML
AMediaType
constant representingtext/xml
media type.static final MediaType
MediaType.TEXT_YAML
AMediaType
constant representing pseudo-registered YAML as text.static final MediaType
MediaType.WILDCARD
AMediaType
constant representing wildcard media type.Fields in io.helidon.common.http with type parameters of type MediaTypeModifier and TypeFieldDescriptionMediaType.JSON_EVENT_STREAM_PREDICATE
Predicate to test ifMediaType
istext/event-stream
without any parameter or with parameter "element-type".MediaType.JSON_PREDICATE
MediaType.XML_PREDICATE
Methods in io.helidon.common.http that return MediaTypeModifier and TypeMethodDescriptionMediaType.Builder.build()
static MediaType
Creates a new instance ofMediaType
with the supplied type and subtype.static MediaType
Parses a media type from its string representation.static MediaType
MediaType.parseRelaxed
(String input) Parses a media type from its string representation in relaxed mode.MediaType.withCharset
(String charset) Create a newMediaType
instance with the same type, subtype and parameters copied from the original instance and the supplied "charset" parameter.MediaType.withoutParameters()
Deprecated, for removal: This API element is subject to removal in a future version.will be removed in 4.x version.Methods in io.helidon.common.http with parameters of type MediaTypeModifier and TypeMethodDescriptionstatic FormParams
Deprecated.useFormParams.builder()
instead or registerio.helidon.media.common.FormParamsBodyReader
boolean
Check if this media type is compatible with another media type. -
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_JSON
when JSON entity is present, toAPPLICATION_OCTET_STREAM
for publisher base requests, empty otherwise.ApiRestRequest.requestMediaType
(MediaType mediaType) ApiJsonRequest.responseMediaType
(MediaType mediaType) ApiRequest.responseMediaType
(MediaType mediaType) The accept header, defaults toAPPLICATION_JSON
for 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 inboundAccept
header.MessageBodyWriterContext.findAccepted
(Predicate<MediaType> predicate, MediaType defaultType) Find an media type in the inboundAccept
header 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 inboundAccept
header.MessageBodyReaderContext.contentType()
Get theContent-Type
header.MessageBodyWriterContext.contentType()
Get theContent-Type
header.Methods in io.helidon.media.common with parameters of type MediaTypeModifier and TypeMethodDescriptionvoid
MessageBodyWriterContext.contentType
(MediaType contentType) Set theContent-Type
header value in the underlying headers if not present.MessageBodyWriterContext.findAccepted
(MediaType mediaType) Find the given media type in the inboundAccept
header.MessageBodyWriterContext.findAccepted
(Predicate<MediaType> predicate, MediaType defaultType) Find an media type in the inboundAccept
header 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 MessageBodyReaderContext
MessageBodyReaderContext.create
(MediaContext mediaContext, MessageBodyContext.EventListener eventListener, ReadOnlyHeaders headers, Optional<MediaType> contentType) Create a new empty reader context backed by the specified headers.static MessageBodyReaderContext
MessageBodyReaderContext.create
(MediaContext mediaContext, MessageBodyContext.EventListener eventListener, ReadOnlyParameters headers, Optional<MediaType> contentType) Deprecated, for removal: This API element is subject to removal in a future version.UseMessageBodyReaderContext.create(MediaContext, io.helidon.media.common.MessageBodyContext.EventListener, io.helidon.common.http.ReadOnlyHeaders, java.util.Optional)
instead, passingReadOnlyHeaders
instead ofReadOnlyParameters
.static MessageBodyReaderContext
MessageBodyReaderContext.create
(MessageBodyReaderContext parent, MessageBodyContext.EventListener eventListener, ReadOnlyHeaders headers, Optional<MediaType> contentType) Create a new empty reader context backed by the specified headers.static MessageBodyReaderContext
MessageBodyReaderContext.create
(MessageBodyReaderContext parent, MessageBodyContext.EventListener eventListener, ReadOnlyParameters headers, Optional<MediaType> contentType) Deprecated, for removal: This API element is subject to removal in a future version.UseMessageBodyReaderContext.create(MessageBodyReaderContext, io.helidon.media.common.MessageBodyContext.EventListener, io.helidon.common.http.ReadOnlyHeaders, java.util.Optional)
instead, passingReadOnlyHeaders
instead ofReadOnlyParameters
.static MessageBodyWriterContext
MessageBodyWriterContext.create
(MediaContext mediaContext, MessageBodyContext.EventListener eventListener, Headers headers, List<MediaType> acceptedTypes) Create a new writer context.static MessageBodyWriterContext
MessageBodyWriterContext.create
(MediaContext mediaContext, MessageBodyContext.EventListener eventListener, Parameters headers, List<MediaType> acceptedTypes) Deprecated, for removal: This API element is subject to removal in a future version.UseMessageBodyWriterContext.create(MediaContext, io.helidon.media.common.MessageBodyContext.EventListener, io.helidon.common.http.Headers, java.util.List)
instead, passingHeaders
instead ofParameters
.static MessageBodyWriterContext
MessageBodyWriterContext.create
(MessageBodyWriterContext parent, MessageBodyContext.EventListener eventListener, Headers headers, List<MediaType> acceptedTypes) Create a new writer context.static MessageBodyWriterContext
MessageBodyWriterContext.create
(MessageBodyWriterContext parent, MessageBodyContext.EventListener eventListener, Parameters headers, List<MediaType> acceptedTypes) Deprecated, for removal: This API element is subject to removal in a future version.UseMessageBodyWriterContext.create(MessageBodyWriterContext, io.helidon.media.common.MessageBodyContext.EventListener, io.helidon.common.http.Headers, java.util.List)
instead, passingHeaders
instead ofParameters
.MessageBodyWriterContext.findAccepted
(Predicate<MediaType> predicate, MediaType defaultType) Find an media type in the inboundAccept
header 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-Type
header.ReadableBodyPartHeaders.contentType()
WriteableBodyPartHeaders.contentType()
default MediaType
BodyPartHeaders.defaultContentType()
Returns the defaultContent-Type
header value:APPLICATION_OCTET_STREAM
if theContent-Disposition
header 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-Type
header.void
WriteableBodyPartHeaders.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 MediaType
OpenAPISupport.DEFAULT_RESPONSE_MEDIA_TYPE
Default media type used in responses in absence of incoming Accept header.Methods in io.helidon.openapi that return MediaTypeModifier and TypeMethodDescriptionOpenApiUi.supportedMediaTypes()
Indicates the media types the UI implementation itself supports.Methods in io.helidon.openapi that return types with arguments of type MediaTypeMethods in io.helidon.openapi with parameters of type MediaTypeModifier and TypeMethodDescriptionprotected String
OpenApiUiBase.prepareDocument
(MediaType mediaType) Prepares a representation of the OpenAPI document in the specified media type.protected boolean
OpenApiUiBase.sendStaticText
(ServerRequest request, ServerResponse response, MediaType mediaType) Sends a static text response of the given media type.Method parameters in io.helidon.openapi with type arguments of type MediaTypeModifier and TypeMethodDescriptiondefault OpenApiUi
Creates a newOpenApiUi
from the builder.OpenApiUi.Builder.documentPreparer
(Function<MediaType, String> documentPreparer) Assigns how the OpenAPI UI can obtain a formatted document for a given media type.OpenApiUiBase.Builder.documentPreparer
(Function<MediaType, String> documentPreparer) Constructor parameters in io.helidon.openapi with type arguments of type MediaTypeModifierConstructorDescriptionprotected
OpenApiUiBase
(OpenApiUiBase.Builder<?, ?> builder, Function<MediaType, String> documentPreparer, String openAPIWebContext) Creates a new UI implementation from the specified builder and document preparer. -
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 MediaType
JsonService.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.void
ResponseHeaders.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.void
ResponseHeaders.contentType
(MediaType contentType) Sets the MIME type of the response body.RequestPredicate.hasContentType
(MediaType... contentType) Only accept requests with any of the given content types.boolean
RequestHeaders.isAccepted
(MediaType mediaType) Test if the given media type is acceptable as a response for this request.<T> ServerResponse
ServerResponse.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> ServerResponse
ServerResponse.registerWriter
(Predicate<?> accept, MediaType contentType, Function<T, Flow.Publisher<DataChunk>> function) Deprecated.since 2.0.0, useServerResponse.registerWriter(io.helidon.media.common.MessageBodyWriter)
insteadprotected MediaType
JsonService.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.