internal: add EncodeProp

This allows to simplify carddav.QueryAddressBook's request marshaling.
This commit is contained in:
Simon Ser
2020-01-15 11:17:38 +01:00
parent 45cd1977d4
commit 25ab0b2076
3 changed files with 26 additions and 13 deletions

View File

@@ -21,7 +21,7 @@ func NewClient(c *http.Client, endpoint string) (*Client, error) {
func (c *Client) FindCurrentUserPrincipal() (string, error) {
name := xml.Name{"DAV:", "current-user-principal"}
propfind := internal.NewPropPropfind(name)
propfind := internal.NewPropNamePropfind(name)
resp, err := c.c.PropfindFlat("/", propfind)
if err != nil {