Changes

Jump to navigation Jump to search
7 bytes removed ,  11:20, 28 March 2015
=Content Type=
As the content type of a REST response cannot be dynamically determined in all cases, it can be enforced by the user. The final content type of a REST response is chosen in several stepsas follows:
# By defaultIf a [[Serialization|media-type]] is supplied, either as [[#Parameters|query parameter]] or within the query, it will be used as content -type of a response depends on the chosen operation:.#* '''Query'''/'''Run''' → <code>application/xml</code>#* '''Command''' → <code>text/plain</code>#* '''Get''' → <code>application/xml</code>Otherwise, or content type of the addressed resource# The default content type is overwritten if a [[Serialization|serialization method]] is specified, supplied (either as [[#Parameters|query parameter]] or within the XQuery expression. The following method/query), the content-type mappings existwill be chosen according to the following mapping:
#* <code>xml</code> → <code>application/xml</code>
#* <code>xhtml</code> → <code>text/html</code>
#* <code>raw</code> → <code>application/octet-stream</code>
#* <code>json</code> → <code>application/json</code>
# The resulting content type is overwritten again if a specific [[Serialization|If no media-type]] or serialization method is supplied (either as query parameter , the content type of a response depends on the chosen REST operation:#* '''Query'''/'''Run''' → <code>application/xml</code>#* '''Command''' → <code>text/plain</code>#* '''Get''' → <code>application/xml</code>, or within content type of the query).addressed resource
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