I'm working on a tool that uses the
VersionOne Meta API. I need to get details about defect attributes in the JSON format so I send the following request (I'm using the API Examples VersionOne instance just for demonstrating purposes):
It worked fine. But in one day I noticed it gets the response in the XML format. I've started to dig and found the response is cached for one hour (Cache-Control: public, max-age=3600) and the Vary header includes only the Accept-Encoding header and doesn't include the Content-Type header. So if the cache is stale and someone sends a request for getting metadata in the XML format, that response will be cached for 1 hour and sent to everyone disregarding the Accept header value specified in the request. I've tried to add -H 'Cache-Control: no-store' to the request but it doesn't help.
The issue can be reproduced by following these steps: