text/plain;version=0.0.4;q=1,*/*;q=0.1
Data is exposed via REST over HTTP under the /metrics base path in two different data formats for GET requests:
• JSON format - used when the HTTP Accept header matches application/json.
• Prometheus text format - default response format when the HTTP Accept header does not match
any more specific media type like application/json.
If we should honor the Accept header as it is designed, I should return Prometheus format any time text/plain has higher q than application/json (and vice versa).
Could somebody from the Metrics spec provide a clear answer to:
Should I honor the order and "q" in Accept header and return JSON only if application/json is preferred over text/plain, or should I return JSON if application/json is supported by the Accept header (supported means that at least one segment of Accept header matches application/json)?
Thanks,
Tomas