CLOUD: Update OneDrive

Added JSON checks.

New jsonContainsObject() method added to CurlJsonRequest.
This commit is contained in:
Alexander Tkachev 2016-07-26 14:53:44 +06:00
parent d34b9b91ad
commit fc8e29d583
5 changed files with 83 additions and 22 deletions

View file

@ -93,7 +93,7 @@ void GoogleDriveStorage::getAccessToken(BoolCallback callback, Networking::Error
Networking::JsonCallback innerCallback = new Common::CallbackBridge<GoogleDriveStorage, BoolResponse, Networking::JsonResponse>(this, &GoogleDriveStorage::tokenRefreshed, callback);
if (errorCallback == nullptr)
errorCallback = getErrorPrintingCallback();
Networking::CurlJsonRequest *request = new Networking::CurlJsonRequest(innerCallback, errorCallback, GOOGLEDRIVE_OAUTH2_TOKEN); //TODO
Networking::CurlJsonRequest *request = new Networking::CurlJsonRequest(innerCallback, errorCallback, GOOGLEDRIVE_OAUTH2_TOKEN);
if (codeFlow) {
request->addPostField("code=" + code);
request->addPostField("grant_type=authorization_code");