diff --git a/http-core/src/main/mima-filters/1.2.x.backwards.excludes/content-media-type-value-string.backwards.excludes b/http-core/src/main/mima-filters/1.2.x.backwards.excludes/content-media-type-value-string.backwards.excludes new file mode 100644 index 000000000..1ef1b48c1 --- /dev/null +++ b/http-core/src/main/mima-filters/1.2.x.backwards.excludes/content-media-type-value-string.backwards.excludes @@ -0,0 +1,2 @@ +ProblemFilters.exclude[ReversedMissingMethodProblem]("org.apache.pekko.http.javadsl.model.ContentType.value") +ProblemFilters.exclude[ReversedMissingMethodProblem]("org.apache.pekko.http.javadsl.model.MediaType.value") diff --git a/http-core/src/main/scala/org/apache/pekko/http/javadsl/model/ContentType.scala b/http-core/src/main/scala/org/apache/pekko/http/javadsl/model/ContentType.scala index 5ee185858..2e7ccafc3 100644 --- a/http-core/src/main/scala/org/apache/pekko/http/javadsl/model/ContentType.scala +++ b/http-core/src/main/scala/org/apache/pekko/http/javadsl/model/ContentType.scala @@ -61,4 +61,10 @@ trait ContentType { * Returns the charset if this ContentType is non-binary. */ def getCharsetOption: Optional[HttpCharset] + + /** + * Returns the string representation of this ContentType + * @since 1.2.0 + */ + def value: String } diff --git a/http-core/src/main/scala/org/apache/pekko/http/javadsl/model/MediaType.scala b/http-core/src/main/scala/org/apache/pekko/http/javadsl/model/MediaType.scala index 89cd99dd1..f92ff83d5 100644 --- a/http-core/src/main/scala/org/apache/pekko/http/javadsl/model/MediaType.scala +++ b/http-core/src/main/scala/org/apache/pekko/http/javadsl/model/MediaType.scala @@ -110,4 +110,10 @@ trait MediaType { * Creates a media-range from this media-type with a given qValue. */ def toRange(qValue: Float): MediaRange + + /** + * Returns the string representation of this MediaType + * @since 1.2.0 + */ + def value: String }