Skip to content
Snippets Groups Projects
Commit 273fb758 authored by Vincent Petry's avatar Vincent Petry
Browse files

Update davclient library for propfind headers

parent 6c0e9211
Branches
No related tags found
No related merge requests found
...@@ -40,18 +40,19 @@ dav.Client.prototype = { ...@@ -40,18 +40,19 @@ dav.Client.prototype = {
* *
* @param {string} url Url to do the propfind request on * @param {string} url Url to do the propfind request on
* @param {Array} properties List of properties to retrieve. * @param {Array} properties List of properties to retrieve.
* @param {Object} [headers] headers
* @return {Promise} * @return {Promise}
*/ */
propFind : function(url, properties, depth) { propFind : function(url, properties, depth, headers) {
if(typeof depth == "undefined") { if(typeof depth == "undefined") {
depth = 0; depth = 0;
} }
var headers = { headers = headers || {};
Depth : depth,
'Content-Type' : 'application/xml; charset=utf-8' headers['Depth'] = depth;
}; headers['Content-Type'] = 'application/xml; charset=utf-8';
var body = var body =
'<?xml version="1.0"?>\n' + '<?xml version="1.0"?>\n' +
...@@ -103,6 +104,7 @@ dav.Client.prototype = { ...@@ -103,6 +104,7 @@ dav.Client.prototype = {
* *
* @param {string} url Url to do the proppatch request on * @param {string} url Url to do the proppatch request on
* @param {Array} properties List of properties to store. * @param {Array} properties List of properties to store.
* @param {Object} [headers] headers
* @return {Promise} * @return {Promise}
*/ */
propPatch : function(url, properties, headers) { propPatch : function(url, properties, headers) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment