ContentType { @Override public String toString() { return contentType; } private  ContentType(String contentType, String mediaType, Charset charset); static ContentType parse(String contentType); static ContentType create(String mediaType, Charset charset); Optional<Charset> charset(); @Override String toString(); static final ContentType TEXT_HTML; static final ContentType TEXT_CSS; static final ContentType TEXT_PLAIN; static final ContentType TEXT_XML; static final ContentType APPLICATION_JSON; static final ContentType APPLICATION_JAVASCRIPT; static final ContentType APPLICATION_FORM_URLENCODED; static final ContentType APPLICATION_OCTET_STREAM; static final ContentType IMAGE_PNG; final String mediaType; }
@Test void value() { assertThat(ContentType.APPLICATION_JSON.toString()).isEqualTo("application/json; charset=utf-8"); assertThat(ContentType.APPLICATION_OCTET_STREAM.toString()).isEqualTo("application/octet-stream"); }