fixed #408: If host not includes http(s):// then add it automatically

This commit is contained in:
Jaex 2014-12-15 12:15:49 +02:00
parent 0ab449a4f9
commit 40868f8ad8

View file

@ -120,6 +120,7 @@ public string ShareFile(string path)
args.Add("permissions", "1"); // 1 = read; 2 = update; 4 = create; 8 = delete; 16 = share; 31 = all (default: 31, for public shares: 1)
string url = URLHelpers.CombineURL(Host, "ocs/v1.php/apps/files_sharing/api/v1/shares?format=json");
url = URLHelpers.FixPrefix(url);
NameValueCollection headers = CreateAuthenticationHeader(Username, Password);
string response = SendRequest(HttpMethod.POST, url, args, headers);