flexrep:pull-set-http-options( $pull as element(flexrep:pull), $http-options as element(flexrep:http-options) ) as element(flexrep:pull)
This function sets the HTTP options for the specified pull configuration.
Parameters | |
---|---|
pull |
The pull replication configuration returned by the
flexrep:pull-get
function.
|
http-options | The HTTP options in XML format to set for the pull configuration. |
xquery version "1.0-ml"; import module namespace flexrep = "http://marklogic.com/xdmp/flexible-replication" at "/MarkLogic/flexrep.xqy"; let $http-options := <flexrep:http-options xmlns:flexrep="http://marklogic.com/xdmp/flexible-replication"> <http:authentication xmlns:http="xdmp:http"> <http:username>replicator</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> let $pull-config := flexrep:pull-get(9535475951259984368, fn:true()) let $pull-config := flexrep:pull-set-http-options($pull-config, $http-options) return flexrep:pull-insert($pull-config) (: Sets the specified HTTP options for the specified Pull Configuration. :)
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.