Changes

Jump to navigation Jump to search
59 bytes added ,  11:32, 28 March 2015
As the content type of a REST response cannot necessarily be dynamically determined, it can be enforced by the user. The final content type of a REST response is chosen as follows:
# If a the serialization parameter <code>[[Serialization|media-type]] </code> is supplied, either as [[#Parameters|query parameter]] or within the query, it will be adopted as content-type.# Otherwise, if a the serialization parameter <code>[[Serialization|serialization method]] </code> is supplied (either as query parameter or within the query), the content-type will be chosen according to the following mapping:
#* <code>xml</code> → <code>application/xml</code>
#* <code>xhtml</code> → <code>text/html</code>
#* '''Command''' → <code>text/plain</code>
#* '''Get''' → <code>application/xml</code>, or content type of the addressed resource
 
Serialization parameters can either be supplied as [[#Parameters|query parameters]] or within the query.
The following three example requests all return <code>&lt;a/&gt;</code> with <code>application/xml</code> as content-type:
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu