Loading TOC...

xdmp:set-response-content-type

xdmp:set-response-content-type(
   $name as xs:string
) as empty-sequence()

Summary

Sets the response content-type.

Parameters
$name The content type.

Example

xdmp:set-response-content-type("text/html")

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.

Comments

The commenting feature on this page is enabled by a third party. Comments posted to this page are publicly visible.
  • Can I have more detail or an example of how one would do this to create a PDF or Excel file from the response? Would you do it in xQuery or would it need to be set in xcc/java? xdmp:set-response-content-type("application/pdf") xdmp:set-response-content-type("application/vnd.ms-excel")