You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2021/02/18 18:20:09 UTC
[httpcomponents-core] 09/10: HTTPCORE-668 - W3C recommendation
text/event-stream
This is an automated email from the ASF dual-hosted git repository.
olegk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/httpcomponents-core.git
commit 35c1541c098b30da5a0a37e73006db77c07dc022
Author: Arturo Bernal <ar...@gmail.com>
AuthorDate: Fri Feb 12 20:41:21 2021 +0100
HTTPCORE-668 - W3C recommendation text/event-stream
---
httpcore5/src/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 44419db..dac2a58 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 <a href="https://www.w3.org/TR/eventsource/">Server-Sent Events W3C recommendation</a>
+ * @since 5.1
+ */
+ public static final String TEXT_EVENT_STREAM = "text/event-stream";
+
public static final ContentType WILDCARD = create(
"*/*", (Charset) null);