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

Allow an operation on an endpoint to specify the media type that it produces #10118

Closed
wilkinsona opened this issue Aug 30, 2017 · 1 comment
Closed
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@wilkinsona
Copy link
Member

The Prometheus endpoint that's proposed in #9970 needs to provide an operation that returns text/plain; version=0.0.4; charset=utf-8. There's no way to do so with the current web endpoint infrastructure.

@wilkinsona wilkinsona added this to the 2.0.0.M4 milestone Aug 30, 2017
@wilkinsona wilkinsona self-assigned this Aug 30, 2017
@wilkinsona
Copy link
Member Author

wilkinsona commented Aug 31, 2017

This is, arguably, also applicable to JMX. At the moment, any response from an endpoint that isn't already a String is serialised into JSON and then returned as a String. Rather than always using JSON, the media type produced by the operation could be used to influence that conversion.

This possible enhancement shouldn't be tackled in this issue, but the design should consider the fact that knowing what media type an operation produces isn't, necessarily, specific to web endpoints.

@wilkinsona wilkinsona changed the title Allow an operation on a web endpoint to specify the media type that it produces Allow an operation on an endpoint to specify the media type that it produces Aug 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant