endpoint: https://api.tfl.gov.uk/line/mode/tube,dlr,overground,tram,elizabeth-line/status
I’ve found that the response from the above endpoint randomly sometimes returns XML and other times is JSON.
I’m setting the content-type http header to application/json
I’ve created the same request in Postman and it exhibits this switching between xml and json - and also simply opening that endpoint in a browser and then refreshing multiple times will yield the same behaviour.
Is there a way to always retrieve JSON ?