Should the representation(html, xml, json) returned by a RESTful web service be determined by the url or by the Accept HTTP header?
See Chapter 5 - Representational State Transfer (REST), section 5.2.1.2 Representations of Roy Fielding's dissertation on Architectural Styles:
The data format of a representation is known as a media type [48].
Looking at the link, we see that it refers to MIME. So I assume that in HTTP parlance, it is represented with a Content-Type header for POST/PUT and Accept header for GET.
Here is the rest of the paragraph (for completeness):
A representation can be included in a message and processed by the recipient according to the control data of the message and the nature of the media type. Some media types are intended for automated processing, some are intended to be rendered for viewing by a user, and a few are capable of both. Composite media types can be used to enclose multiple representations in a single message.
P.S.: I am not sure why people never look in the place where REST is actually defined...