polycube
polycube copied to clipboard
[Feature Request] Polycubed HTTP responses should follow the requests "Accept" header
Currently, the Accept
header of the clients HTTP requests is completely ignored by Polycubed
and its responses always have the ContentType
header set as application/yang.data+json
.
Polycubed HTTP responses should follow the requests "Accept" header, providing data if capable to return them in the required content type.
I'd like to receive HTTP responses with different content types rather then json.
Use case:
if a cube is capable to export metrics in OpenMetrics format, it should be able to response with a text/plain
content type.