From c69cf81cd255cfd3f0ef99a2c22479d6322830b6 Mon Sep 17 00:00:00 2001 From: Arturo Bernal Date: Fri, 12 Feb 2021 20:41:21 +0100 Subject: [PATCH] HTTPCORE-668 - W3C recommendation text/event-stream --- .../main/java/org/apache/hc/core5/http/ContentType.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/ContentType.java b/httpcore5/src/main/java/org/apache/hc/core5/http/ContentType.java index 44419db9bb..dac2a58be4 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/ContentType.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/ContentType.java @@ -109,6 +109,13 @@ public final class ContentType implements Serializable { "text/plain", StandardCharsets.ISO_8859_1); public static final ContentType TEXT_XML = create( "text/xml", StandardCharsets.UTF_8); + /** + * Public constant media type for {@code text/event-stream}. + * @see Server-Sent Events W3C recommendation + * @since 5.1 + */ + public static final String TEXT_EVENT_STREAM = "text/event-stream"; + public static final ContentType WILDCARD = create( "*/*", (Charset) null);