Requesting a restful service with accept header set to application/xml

273 Views Asked by At

Why requesting a restful service with accept header set to application/xml is returning a Json representation?, in this application in this repository wildfly / quickstart / helloworld-rs

1

There are 1 best solutions below

0
On BEST ANSWER

The @Produces({ "application/json" }) indicates it only produces JSON. If you were to change it to @Produces({ "application/json", "application/xml" }) then it should work.