MarkLogic 9 Product Documentation
flexrep.pullSetHttpOptions

flexrep.pullSetHttpOptions(
   pull as element(flexrep.pull),
   http-options as element(flexrep.httpOptions)
) as element(flexrep.pull)

Summary

This function sets the HTTP options for the specified pull configuration.

Parameters
pull The pull replication configuration returned by the flexrep.pullGet function.
http-options The HTTP options in XML format to set for the pull configuration.

Example

const flexrep = require('/MarkLogic/flexrep');

  declareUpdate();
  let httpOptions = fn.head(xdmp.unquote('<flexrep:http-options xmlns:flexrep="http://marklogic.com/xdmp/flexible-replication">' +
      '<http:authentication xmlns:http="xdmp:http">' +
        '<http:username>admin</http:username>' +
        '<http:password>admin</http:password>' +
      '</http:authentication>' +
      '<http:client-cert xmlns:http="xdmp:http"/>' +
      '<http:client-key xmlns:http="xdmp:http"/>' +
      '<http:pass-phrase xmlns:http="xdmp:http"/>' +
    '</flexrep:http-options>'
    )).root;

  let pullConfig = flexrep.pullGet(13991089731050213376, true);
  let pullCfg = flexrep.pullSetHttpOptions(pullConfig, httpOptions);

  flexrep.pullInsert(pullCfg);

  // Sets the specified HTTP options for the specified Pull Configuration.
   
Powered by MarkLogic Server | Terms of Use | Privacy Policy