Package akka.http.javadsl.model
Class ContentTypes
- java.lang.Object
-
- akka.http.javadsl.model.ContentTypes
-
public final class ContentTypes extends java.lang.Object
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 aMediaType
by using:MediaTypes.TEXT_HTML.toContentType()
-
-
Field Summary
Fields Modifier and Type Field Description static ContentType.Binary
APPLICATION_GRPC_PROTO
static ContentType.WithFixedCharset
APPLICATION_JSON
static ContentType.Binary
APPLICATION_OCTET_STREAM
static ContentType.WithFixedCharset
APPLICATION_X_WWW_FORM_URLENCODED
static ContentType.Binary
NO_CONTENT_TYPE
static ContentType.WithCharset
TEXT_CSV_UTF8
static ContentType.WithCharset
TEXT_HTML_UTF8
static ContentType.WithCharset
TEXT_PLAIN_UTF8
static ContentType.WithCharset
TEXT_XML_UTF8
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ContentType.Binary
create(MediaType.Binary mediaType)
static ContentType.WithFixedCharset
create(MediaType.WithFixedCharset mediaType)
static ContentType.WithCharset
create(MediaType.WithOpenCharset mediaType, HttpCharset charset)
static ContentType
parse(java.lang.String contentType)
-
-
-
Field Detail
-
APPLICATION_JSON
public static final ContentType.WithFixedCharset APPLICATION_JSON
-
APPLICATION_OCTET_STREAM
public static final ContentType.Binary APPLICATION_OCTET_STREAM
-
TEXT_PLAIN_UTF8
public static final ContentType.WithCharset TEXT_PLAIN_UTF8
-
TEXT_HTML_UTF8
public static final ContentType.WithCharset TEXT_HTML_UTF8
-
TEXT_XML_UTF8
public static final ContentType.WithCharset TEXT_XML_UTF8
-
TEXT_CSV_UTF8
public static final ContentType.WithCharset TEXT_CSV_UTF8
-
APPLICATION_GRPC_PROTO
public static final ContentType.Binary APPLICATION_GRPC_PROTO
-
APPLICATION_X_WWW_FORM_URLENCODED
public static final ContentType.WithFixedCharset APPLICATION_X_WWW_FORM_URLENCODED
-
NO_CONTENT_TYPE
public static final ContentType.Binary NO_CONTENT_TYPE
-
-
Method Detail
-
parse
public static ContentType parse(java.lang.String contentType)
-
create
public static ContentType.Binary create(MediaType.Binary mediaType)
-
create
public static ContentType.WithFixedCharset create(MediaType.WithFixedCharset mediaType)
-
create
public static ContentType.WithCharset create(MediaType.WithOpenCharset mediaType, HttpCharset charset)
-
-