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 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_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_SVG_XML
AMediaType
constant representingapplication/svg+xml
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_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_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.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.Methods in io.helidon.common.http with parameters of type MediaType Modifier and Type Method Description static FormParams
FormParams. create(String paramAssignments, MediaType mediaType)
Creates a newFormParams
instance using the provided assignment string and media type.boolean
MediaType. 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 MediaType
OpenAPISupport. DEFAULT_RESPONSE_MEDIA_TYPE
Default 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 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)
Registers a content writer for a given type and media type.<T> ServerResponse
ServerResponse. registerWriter(Predicate<?> accept, MediaType contentType, Function<T,Flow.Publisher<DataChunk>> function)
Registers a content writer for all accepted contents.protected MediaType
JsonService. toJsonResponseType(MediaType acceptedType)
Returns the response type for the given type if it is an accepted JSON type.
-