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.integrations.common.rest Common classes for accessing JSON based REST APIs of third party systems.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.io.helidon.webserver.staticcontent Static content support for HelidonWebServer
. -
-
Uses of MediaType in io.helidon.common.http
Fields in io.helidon.common.http declared as MediaType Modifier and Type Field Description static MediaType
MediaType. APPLICATION_ATOM_XML
AMediaType
constant representingapplication/atom+xml
media type.static MediaType
MediaType. APPLICATION_FORM_URLENCODED
AMediaType
constant representingapplication/x-www-form-urlencoded
media type.static MediaType
MediaType. APPLICATION_JAVASCRIPT
AMediaType
constant representingapplication/javascript
media type.static MediaType
MediaType. APPLICATION_JSON
AMediaType
constant representingapplication/json
media type.static MediaType
MediaType. APPLICATION_OCTET_STREAM
AMediaType
constant representingapplication/octet-stream
media type.static MediaType
MediaType. APPLICATION_OPENAPI_JSON
AMediaType
constant representing OpenAPI json.static MediaType
MediaType. APPLICATION_OPENAPI_YAML
AMediaType
constant representing OpenAPI yaml.static MediaType
MediaType. APPLICATION_OPENMETRICS
AMediaType
constant representing theapplication/openmetrics-text
media type.static MediaType
MediaType. APPLICATION_STREAM_JSON
AMediaType
constant representingapplication/stream+json
media type.static MediaType
MediaType. APPLICATION_SVG_XML
AMediaType
constant representingapplication/svg+xml
media type.static MediaType
MediaType. APPLICATION_X_NDJSON
AMediaType
constant representingapplication/x-ndjson
media type.static MediaType
MediaType. APPLICATION_X_YAML
AMediaType
constant representing "x" YAML as application.static MediaType
MediaType. APPLICATION_XHTML_XML
AMediaType
constant representingapplication/xhtml+xml
media type.static MediaType
MediaType. APPLICATION_XML
AMediaType
constant representingapplication/xml
media type.static MediaType
MediaType. APPLICATION_YAML
AMediaType
constant representing pseudo-registered YAML.static MediaType
MediaType. MULTIPART_FORM_DATA
AMediaType
constant representingmultipart/form-data
media type.static MediaType
MediaType. TEXT_EVENT_STREAM
AMediaType
constant representingtext/event-stream
media type.static MediaType
MediaType. TEXT_HTML
AMediaType
constant representingtext/html
media type.static MediaType
MediaType. TEXT_PLAIN
AMediaType
constant representingtext/plain
media type.static MediaType
MediaType. TEXT_X_YAML
AMediaType
constant representing "x" YAML as text.static MediaType
MediaType. TEXT_XML
AMediaType
constant representingtext/xml
media type.static MediaType
MediaType. TEXT_YAML
AMediaType
constant representing pseudo-registered YAML as text.static MediaType
MediaType. WILDCARD
AMediaType
constant 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_EVENT_STREAM_PREDICATE
Predicate to test ifMediaType
istext/event-stream
without any parameter or with parameter "element-type".static Predicate<MediaType>
MediaType. JSON_PREDICATE
static Predicate<MediaType>
MediaType. XML_PREDICATE
Methods in io.helidon.common.http that return MediaType Modifier and Type Method Description MediaType
MediaType.Builder. build()
static MediaType
MediaType. create(String type, String subtype)
Creates a new instance ofMediaType
with the supplied type and subtype.static MediaType
MediaType. parse(String input)
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
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
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 MediaType Modifier and Type Method Description static FormParams
FormParams. create(String paramAssignments, MediaType mediaType)
Deprecated.useFormParams.builder()
instead or registerio.helidon.media.common.FormParamsBodyReader
boolean
MediaType. test(MediaType other)
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 MediaType Modifier and Type Method Description Optional<MediaType>
ApiJsonRequest. requestMediaType()
Optional<MediaType>
ApiRequest. requestMediaType()
Request media type.Optional<MediaType>
ApiRestRequest. requestMediaType()
Optional<MediaType>
ApiJsonRequest. responseMediaType()
Optional<MediaType>
ApiRequest. responseMediaType()
Response media type.Optional<MediaType>
ApiRestRequest. responseMediaType()
Methods in io.helidon.integrations.common.rest with parameters of type MediaType Modifier and Type Method Description T
ApiJsonRequest. requestMediaType(MediaType mediaType)
T
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.T
ApiRestRequest. requestMediaType(MediaType mediaType)
T
ApiJsonRequest. responseMediaType(MediaType mediaType)
T
ApiRequest. responseMediaType(MediaType mediaType)
The accept header, defaults toAPPLICATION_JSON
for most requests, except for requests that return publisher, which default toAPPLICATION_OCTET_STREAM
.T
ApiRestRequest. responseMediaType(MediaType mediaType)
-
Uses of MediaType in io.helidon.media.common
Methods in io.helidon.media.common that return MediaType Modifier and Type Method Description MediaType
MessageBodyWriterContext. findAccepted(MediaType mediaType)
Find the given media type in the inboundAccept
header.MediaType
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 MediaType Modifier and Type Method Description List<MediaType>
MessageBodyWriterContext. acceptedTypes()
Get the inboundAccept
header.Optional<MediaType>
MessageBodyReaderContext. contentType()
Get theContent-Type
header.Optional<MediaType>
MessageBodyWriterContext. contentType()
Get theContent-Type
header.Methods in io.helidon.media.common with parameters of type MediaType Modifier and Type Method Description void
MessageBodyWriterContext. contentType(MediaType contentType)
Set theContent-Type
header value in the underlying headers if not present.MediaType
MessageBodyWriterContext. findAccepted(MediaType mediaType)
Find the given media type in the inboundAccept
header.MediaType
MessageBodyWriterContext. findAccepted(Predicate<MediaType> predicate, MediaType defaultType)
Find an media type in the inboundAccept
header with the given predicate and default value.<T> MessageBodyWriterContext
MessageBodyWriterContext. registerWriter(Class<T> type, MediaType contentType, Function<? extends T,Flow.Publisher<DataChunk>> function)
Deprecated.since 2.0.0, useMessageBodyWriterContext.registerWriter(MessageBodyWriter)
instead<T> MessageBodyWriterContext
MessageBodyWriterContext. 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 MessageBodyReaderContext
MessageBodyReaderContext. create(MediaContext mediaContext, MessageBodyContext.EventListener eventListener, ReadOnlyParameters 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)
Create a new empty reader context backed by the specified headers.static MessageBodyWriterContext
MessageBodyWriterContext. create(MediaContext mediaContext, MessageBodyContext.EventListener eventListener, Parameters headers, List<MediaType> acceptedTypes)
Create a new writer context.static MessageBodyWriterContext
MessageBodyWriterContext. create(MessageBodyWriterContext parent, MessageBodyContext.EventListener eventListener, Parameters headers, List<MediaType> acceptedTypes)
Create a new writer context.MediaType
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 MediaType Modifier and Type Method Description MediaType
BodyPartHeaders. contentType()
Get theContent-Type
header.MediaType
ReadableBodyPartHeaders. contentType()
MediaType
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 MediaType Modifier and Type Method Description WriteableBodyPartHeaders.Builder
WriteableBodyPartHeaders.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 MediaType Modifier and Type Field Description static 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 MediaType Modifier and Type Method Description MediaType[]
OpenApiUi. supportedMediaTypes()
Indicates the media types the UI implementation itself supports.Methods in io.helidon.openapi that return types with arguments of type MediaType Modifier and Type Method Description Function<MediaType,String>
OpenApiUiBase.Builder. documentPreparer()
Methods in io.helidon.openapi with parameters of type MediaType Modifier and Type Method Description protected 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 MediaType Modifier and Type Method Description default OpenApiUi
OpenApiUi.Builder. build(Function<MediaType,String> documentPreparer, String openAPIWebContext)
Creates a newOpenApiUi
from the builder.B
OpenApiUi.Builder. documentPreparer(Function<MediaType,String> documentPreparer)
Assigns how the OpenAPI UI can obtain a formatted document for a given media type.B
OpenApiUiBase.Builder. documentPreparer(Function<MediaType,String> documentPreparer)
Constructor parameters in io.helidon.openapi with type arguments of type MediaType Constructor Description 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 MediaType Modifier and Type Method Description MediaType
WebClientRequestHeaders. 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 WebClientRequestBuilder
WebClientRequestBuilder. accept(MediaType... mediaTypes)
Media types which are accepted in the response.WebClientRequestHeaders
WebClientRequestHeaders. addAccept(MediaType mediaType)
Add acceptedMediaType
.WebClientRequestBuilder
WebClientRequestBuilder. contentType(MediaType contentType)
Content type of the request.WebClientRequestHeaders
WebClientRequestHeaders. 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 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 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 RequestPredicate
RequestPredicate. accepts(MediaType... contentType)
Only 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").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.void
ResponseHeaders. contentType(MediaType contentType)
Sets the MIME type of the response body.StaticContentSupport.Builder
StaticContentSupport.Builder. contentType(String filenameExtension, MediaType contentType)
Maps a filename extension to the response content type.RequestPredicate
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 MediaType Modifier and Type Method Description T
StaticContentSupport.FileBasedBuilder. contentType(String filenameExtension, MediaType contentType)
Maps a filename extension to the response content type.
-