title: Can a RESTful service return both JSON and XML for the same resource, depending on the request header?
body: <p>I have a simple RESTful method which currently returns JSON representation of an object. </p>
  
  <p>My question is more of from the architectural perspective and not completely technical. </p>
  
  <p>Should a RESTful service be designed in such a way that it returns both JSON and XML at the same time?</p>
  
  <p>As far as I know this is a bad practice and separate resources should be defined for this. One resource should return JSON data and other one XML. </p>
  
  <p>Am I thinking it correctly?</p>