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/12 18:17:53 UTC
[httpcomponents-core] branch master updated: HTTPCORE-667 - Add new
Content Type application/problem+json
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
The following commit(s) were added to refs/heads/master by this push:
new 81ecf9c HTTPCORE-667 - Add new Content Type application/problem+json
81ecf9c is described below
commit 81ecf9cbcf45dde87f14b4d3cbc1398775e36e2d
Author: Arturo Bernal <ar...@gmail.com>
AuthorDate: Fri Feb 12 08:06:25 2021 +0100
HTTPCORE-667 - Add new Content Type application/problem+json
---
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 e2bd0f6..44419db 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
@@ -80,6 +80,13 @@ public final class ContentType implements Serializable {
"application/xhtml+xml", StandardCharsets.UTF_8);
public static final ContentType APPLICATION_XML = create(
"application/xml", StandardCharsets.UTF_8);
+ /**
+ * Public constant media type for {@code application/problem+json}.
+ * @see <a href="https://tools.ietf.org/html/rfc7807#section-6.1">Problem Details for HTTP APIs, 6.1. application/problem+json</a>
+ * @since 5.1
+ */
+ public static final ContentType APPLICATION_PROBLEM_JSON = create(
+ "application/problem+json", StandardCharsets.UTF_8);
public static final ContentType IMAGE_BMP = create(
"image/bmp");
public static final ContentType IMAGE_GIF = create(