How to configure Eureka to return JSON?

98 views
Skip to first unread message

rayz...@gmail.com

unread,
Jan 8, 2017, 10:16:20 PM1/8/17
to eureka_netflix
I am currently using Eureka with Spring Cloud. By default Eureka's REST APIs seems to return XML. I wonder if there is a configuration or parameter that makes Eureka return JSON instead of XML.

christ...@gmail.com

unread,
Jan 9, 2017, 7:45:25 AM1/9/17
to eureka_netflix, rayz...@gmail.com
Am Montag, 9. Januar 2017 04:16:20 UTC+1 schrieb rayz...@gmail.com:
> I am currently using Eureka with Spring Cloud. By default Eureka's REST APIs seems to return XML. I wonder if there is a configuration or parameter that makes Eureka return JSON instead of XML.


It seems to work if you set the "Accept" request header to application/json

cheers
Christian

Reply all
Reply to author
Forward
0 new messages