When trying to use the REST API, the content-type header does not change the response format and always returns an xml body. According to the Eureka documentation for the REST API, specifying the content type should allow for JSON responses: https://github.com/Netflix/eureka/wiki/Eureka-REST-operations
// Both of these requests return an xml response
curl http://localhost:8761/eureka/apps -H "Content-Type:application/json;charset=UTF-8"
curl http://localhost:8761/eureka/apps -H "Content-Type:application/json"
Yo, @ngourley , I've struggled myself yesterday with this issue. Apparently you need to also specify the Accept header in order to get the json response.
curl http://localhost:8761/eureka/apps -H "Content-Type:application/json" -H "Accept:application/json"
This is pretty standard content-negotiation (also it is controlled entirely within Netflix code, so we couldn't change it here if we wanted to).
Most helpful comment
Yo, @ngourley , I've struggled myself yesterday with this issue. Apparently you need to also specify the Accept header in order to get the json response.