CLOUD: Add OneDriveStorage::download()

Doesn't work when token is invalid, though.
This commit is contained in:
Alexander Tkachev 2016-05-26 23:56:29 +06:00
parent 8f6bcdf55d
commit 24007c029b
4 changed files with 42 additions and 10 deletions

View file

@ -45,6 +45,7 @@ NetworkReadStream::NetworkReadStream(const char *url, curl_slist *headersList, C
curl_easy_setopt(_easy, CURLOPT_HEADER, 0L);
curl_easy_setopt(_easy, CURLOPT_URL, url);
curl_easy_setopt(_easy, CURLOPT_VERBOSE, 0L);
curl_easy_setopt(_easy, CURLOPT_FOLLOWLOCATION, 1L); //probably it's OK to have it always on
curl_easy_setopt(_easy, CURLOPT_HTTPHEADER, headersList);
if (postFields.size() != 0) {
curl_easy_setopt(_easy, CURLOPT_POSTFIELDSIZE, postFields.size());