Loading TOC...

MarkLogic 12 EA 2 Product Documentation
xdmp.setResponseCompression

xdmp.setResponseCompression(
   value as Boolean,
   [options as String]
) as null

Summary

Enabble/disables HTTP GZIP Response compression

Parameters
value true to enable GZIP compression false otherwise
options Options. The default is ().

Options include:

"compression-level=[0-9]"
Changes the compression level. Level 0 is uncompressed, level 9 is maximum compression. Default is level 2.

Required Privileges

http://marklogic.com/xdmp/privileges/xdmp-add-response-header

Example

xdmp.setResponseCompression(true,"compression-level=6");

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