Package akka.http.javadsl.model
Class ContentTypes
java.lang.Object
akka.http.javadsl.model.ContentTypes
Contains the set of predefined content-types for convenience.
If the ContentType
you're looking for is not pre-defined here,
you can obtain it from a MediaType
by using: MediaTypes.TEXT_HTML.toContentType()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ContentType.Binary
static final ContentType.WithFixedCharset
static final ContentType.Binary
static final ContentType.WithFixedCharset
static final ContentType.Binary
static final ContentType.WithCharset
static final ContentType.WithCharset
static final ContentType.WithCharset
static final ContentType.WithCharset
-
Method Summary
Modifier and TypeMethodDescriptionstatic ContentType.Binary
create
(MediaType.Binary mediaType) static ContentType.WithFixedCharset
create
(MediaType.WithFixedCharset mediaType) static ContentType.WithCharset
create
(MediaType.WithOpenCharset mediaType, HttpCharset charset) static ContentType
-
Field Details
-
APPLICATION_JSON
-
APPLICATION_OCTET_STREAM
-
TEXT_PLAIN_UTF8
-
TEXT_HTML_UTF8
-
TEXT_XML_UTF8
-
TEXT_CSV_UTF8
-
APPLICATION_GRPC_PROTO
-
APPLICATION_X_WWW_FORM_URLENCODED
-
NO_CONTENT_TYPE
-
-
Method Details
-
parse
-
create
-
create
-
create
public static ContentType.WithCharset create(MediaType.WithOpenCharset mediaType, HttpCharset charset)
-