| Package | Description |
|---|---|
| io.helidon.common.http |
HTTP APIs and implementations usable by both server and client side of the HTTP story.
|
| io.helidon.media.jackson.common |
Jackson media type support.
|
| io.helidon.media.jsonp.common |
JSON-P media type support.
|
| io.helidon.webserver |
Reactive web server API.
|
| Modifier and Type | Field and Description |
|---|---|
static MediaType |
MediaType.APPLICATION_ATOM_XML
A
MediaType constant representing application/atom+xml media type. |
static MediaType |
MediaType.APPLICATION_FORM_URLENCODED
A
MediaType constant representing application/x-www-form-urlencoded media type. |
static MediaType |
MediaType.APPLICATION_JSON
A
MediaType constant representing application/json media type. |
static MediaType |
MediaType.APPLICATION_OCTET_STREAM
A
MediaType constant representing application/octet-stream media type. |
static MediaType |
MediaType.APPLICATION_SVG_XML
A
MediaType constant representing application/svg+xml media type. |
static MediaType |
MediaType.APPLICATION_XHTML_XML
A
MediaType constant representing application/xhtml+xml media type. |
static MediaType |
MediaType.APPLICATION_XML
A
MediaType constant representing application/xml media type. |
static MediaType |
MediaType.MULTIPART_FORM_DATA
A
MediaType constant representing multipart/form-data media type. |
static MediaType |
MediaType.TEXT_HTML
A
MediaType constant representing text/html media type. |
static MediaType |
MediaType.TEXT_PLAIN
A
MediaType constant representing text/plain media type. |
static MediaType |
MediaType.TEXT_XML
A
MediaType constant representing text/xml media type. |
static MediaType |
MediaType.WILDCARD
A
MediaType constant representing wildcard media type. |
| Modifier and Type | Field and Description |
|---|---|
static Predicate<MediaType> |
MediaType.JSON_PREDICATE
|
static Predicate<MediaType> |
MediaType.XML_PREDICATE
|
| Modifier and Type | Method and Description |
|---|---|
MediaType |
MediaType.Builder.build() |
static MediaType |
MediaType.create(String type,
String subtype)
Creates a new instance of
MediaType 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 new
MediaType instance with the same type, subtype and parameters
copied from the original instance and the supplied "charset" parameter. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
MediaType.test(MediaType other)
Check if this media type is compatible with another media type.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
JacksonProcessing.isSupported(MediaType type)
Check whether the type is supported by Jackson.
|
| Modifier and Type | Field and Description |
|---|---|
static MediaType |
JsonProcessing.APPLICATION_JAVASCRIPT
JSONP (JSON with Pending) can have this weird type.
|
static MediaType |
JsonProcessing.TEXT_JAVASCRIPT
And the corresponding (obsolete, yet widely supported) text type.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
JsonProcessing.isSupported(MediaType type)
Check whether the type is supported by JSON Processing.
|
| Modifier and Type | Method and 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.
|
| Modifier and Type | Method and 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.
|
Copyright © 2018–2019 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms.