| Package | Description |
|---|---|
| io.helidon.common.http |
HTTP APIs and implementations usable by both server and client side of the HTTP story.
|
| 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 java.util.function.Predicate<MediaType> |
MediaType.JSON_PREDICATE
|
static java.util.function.Predicate<MediaType> |
MediaType.XML_PREDICATE
|
| Modifier and Type | Method and Description |
|---|---|
static MediaType |
MediaType.parse(java.lang.String input)
Parses a media type from its string representation.
|
MediaType |
MediaType.withCharset(java.lang.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 |
|---|---|
java.util.List<MediaType> |
RequestHeaders.acceptedTypes()
Returns a list of acceptedTypes ("Accept" header) content types in quality
factor order.
|
java.util.List<MediaType> |
ResponseHeaders.acceptPatches()
Gets immutable list of supported patch document formats (header "Accept-Patch").
|
java.util.Optional<MediaType> |
RequestHeaders.bestAccepted(MediaType... mediaTypes)
Optionally returns single media type from provided parameters which is best accepted by the client.
|
java.util.Optional<MediaType> |
RequestHeaders.contentType()
Optionally returns the MIME type of the body of the request.
|
java.util.Optional<MediaType> |
ResponseHeaders.contentType()
Optionally gets the MIME type of the response body.
|
| Modifier and Type | Method and Description |
|---|---|
RequestPredicate |
RequestPredicate.accepts(MediaType... contentType)
Accepts only requests accepting any of specified content types.
|
void |
ResponseHeaders.addAcceptPatches(MediaType... acceptableMediaTypes)
Adds one or more acceptedTypes path document formats (header "Accept-Patch").
|
java.util.Optional<MediaType> |
RequestHeaders.bestAccepted(MediaType... mediaTypes)
Optionally returns single media type from provided parameters which is best accepted by the client.
|
void |
ResponseHeaders.contentType(MediaType contentType)
Sets the MIME type of the response body.
|
StaticContentSupport.Builder |
StaticContentSupport.Builder.contentType(java.lang.String filenameExtension,
MediaType contentType)
Maps a filename extension to the response content type.
|
boolean |
RequestHeaders.isAccepted(MediaType mediaType)
Test if provided type is acceptable as a response for this request.
|
<T> ServerResponse |
ServerResponse.registerWriter(java.lang.Class<T> type,
MediaType contentType,
java.util.function.Function<? extends T,Flow.Publisher<DataChunk>> function)
Registers a content writer for a given type and media type.
|
<T> ServerResponse |
ServerResponse.registerWriter(java.util.function.Predicate<?> accept,
MediaType contentType,
java.util.function.Function<T,Flow.Publisher<DataChunk>> function)
Registers a content writer for all accepted contents.
|
Copyright © 2018, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.