polycube icon indicating copy to clipboard operation
polycube copied to clipboard

[Feature Request] Polycubed HTTP responses should follow the requests "Accept" header

Open michelsciortino opened this issue 5 years ago • 0 comments

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.

michelsciortino avatar Jan 25 '20 21:01 michelsciortino