internal: add Client.PropfindFlat

This commit is contained in:
Simon Ser
2020-01-14 21:43:09 +01:00
parent 94d597c1f5
commit 931602e55d
2 changed files with 22 additions and 17 deletions

View File

@@ -23,19 +23,7 @@ func (c *Client) FindCurrentUserPrincipal() (string, error) {
name := xml.Name{"DAV:", "current-user-principal"}
propfind := internal.NewPropPropfind(name)
req, err := c.c.NewXMLRequest("PROPFIND", "/", propfind)
if err != nil {
return "", err
}
req.Header.Add("Depth", "0")
ms, err := c.c.DoMultiStatus(req)
if err != nil {
return "", err
}
resp, err := ms.Get("/")
resp, err := c.c.PropfindFlat("/", propfind)
if err != nil {
return "", err
}