function page:put($body) { "Request body: " || $body };
</pre>
If the request provides a content-type, and if a parser for the given type is available, the request body is converted as follows:
{| class="wikitable" width="100%"
|- valign="top"
! Content-Type
! Target format
|-
| {{Code|application/json}}, {{Code|application/jsonml+json}}
| XML document, as described in the [[JSON Module]]
|-
| {{Code|text/html}}
| XML document, as described in the [[HTML Module]]
|-
| {{Code|text/comma-separated-values}}
| XML document
|-
| {{Code|text/xml}}, {{Code|text/xml-external-parsed-entity}}, {{Code|application/xml}}, {{Code|application/xml-external-parsed-entity}}
| XML document
|-
| {{Code|text/*}}
| {{Code|xs:string}}
|-
| {{Code|multipart/*}}
| sequence (see next paragraph)
|}
====Multipart Types====
{{Mark|Introduced with Version 7.7:}}
Some first support for {{Code|multipart}} content-types has been added: all parts of multipart messages are represented as a sequence,and the single parts are converted as described in the last paragraph. An example:
<pre class="brush:xquery">