Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get string representation of javadsl Content and Media Type #630

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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")
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
mdedetrich marked this conversation as resolved.
Show resolved Hide resolved
def value: String
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be getValue. More Java API like. Other existing methods seem to be getters.

Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Loading