Add Client.SetBasicAuth

This commit is contained in:
Simon Ser
2020-01-15 23:45:37 +01:00
parent dbdd296d38
commit cabf33219e
3 changed files with 22 additions and 5 deletions

View File

@@ -28,6 +28,11 @@ func NewClient(c *http.Client, endpoint string) (*Client, error) {
return &Client{wc, ic}, nil
}
func (c *Client) SetBasicAuth(username, password string) {
c.Client.SetBasicAuth(username, password)
c.ic.SetBasicAuth(username, password)
}
func (c *Client) FindAddressBookHomeSet(principal string) (string, error) {
name := xml.Name{namespace, "addressbook-home-set"}
propfind := internal.NewPropNamePropfind(name)