Package akka.http.javadsl.model
Class ContentTypes
- java.lang.Object
-
- akka.http.javadsl.model.ContentTypes
-
public final class ContentTypes extends java.lang.ObjectContains the set of predefined content-types for convenience.If the
ContentTypeyou're looking for is not pre-defined here, you can obtain it from aMediaTypeby using:MediaTypes.TEXT_HTML.toContentType()
-
-
Field Summary
Fields Modifier and Type Field Description static ContentType.BinaryAPPLICATION_GRPC_PROTOstatic ContentType.WithFixedCharsetAPPLICATION_JSONstatic ContentType.BinaryAPPLICATION_OCTET_STREAMstatic ContentType.WithFixedCharsetAPPLICATION_X_WWW_FORM_URLENCODEDstatic ContentType.BinaryNO_CONTENT_TYPEstatic ContentType.WithCharsetTEXT_CSV_UTF8static ContentType.WithCharsetTEXT_HTML_UTF8static ContentType.WithCharsetTEXT_PLAIN_UTF8static ContentType.WithCharsetTEXT_XML_UTF8
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ContentType.Binarycreate(MediaType.Binary mediaType)static ContentType.WithFixedCharsetcreate(MediaType.WithFixedCharset mediaType)static ContentType.WithCharsetcreate(MediaType.WithOpenCharset mediaType, HttpCharset charset)static ContentTypeparse(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)
-
-