Class ContentTypes
java.lang.Object
org.apache.pekko.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.Binarystatic final ContentType.WithFixedCharsetstatic final ContentType.Binarystatic final ContentType.WithFixedCharsetstatic final ContentType.Binarystatic final ContentType.WithCharsetstatic final ContentType.WithCharsetstatic final ContentType.WithCharsetstatic final ContentType.WithCharset -
Method Summary
Modifier and TypeMethodDescriptionstatic ContentType.Binarycreate(MediaType.Binary mediaType) static ContentType.WithFixedCharsetcreate(MediaType.WithFixedCharset mediaType) static ContentType.WithCharsetcreate(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)
-