get basic information about the user
This commit is contained in:
@@ -20,11 +20,11 @@ const neededXML string = `
|
||||
</d:propfind>
|
||||
`
|
||||
|
||||
var client *http.Client
|
||||
var BuildInClient *http.Client
|
||||
var serverURL string
|
||||
|
||||
func InitDavClient(url string) {
|
||||
client = &http.Client{}
|
||||
BuildInClient = &http.Client{}
|
||||
serverURL = url
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ func GetCalDAVData(username string, password string) SimpleCalDavData {
|
||||
req.Header.Set("Depth", "1")
|
||||
req.Header.Set("Content-Type", "application/xml")
|
||||
|
||||
resp, err := client.Do(req)
|
||||
resp, err := BuildInClient.Do(req)
|
||||
if err != nil {
|
||||
fmt.Print(err.Error())
|
||||
}
|
||||
@@ -120,7 +120,7 @@ func GetCalendarData(cal Calandar, username string, password string) Calandar {
|
||||
req.Header.Set("Depth", "1")
|
||||
req.Header.Set("Content-Type", "application/xml")
|
||||
|
||||
resp, err := client.Do(req)
|
||||
resp, err := BuildInClient.Do(req)
|
||||
if err != nil {
|
||||
fmt.Print(err.Error())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user