internal: add Depth, Client.Propfind

This commit is contained in:
Simon Ser
2020-01-15 12:30:42 +01:00
parent 2b841a9234
commit 42765234a8
2 changed files with 37 additions and 12 deletions

View File

@@ -50,14 +50,7 @@ func (c *Client) FindAddressBooks(addressBookHomeSet string) ([]AddressBook, err
descName := xml.Name{namespace, "addressbook-description"}
propfind := internal.NewPropNamePropfind(resTypeName, descName)
req, err := c.ic.NewXMLRequest("PROPFIND", addressBookHomeSet, propfind)
if err != nil {
return nil, err
}
req.Header.Add("Depth", "1")
ms, err := c.ic.DoMultiStatus(req)
ms, err := c.ic.Propfind(addressBookHomeSet, internal.DepthOne, propfind)
if err != nil {
return nil, err
}