diff options
author | aunsane <aunsane@gmail.com> | 2017-04-25 02:26:25 +0300 |
---|---|---|
committer | aunsane <aunsane@gmail.com> | 2017-04-25 02:27:36 +0300 |
commit | 71b5d463456a90d1d0ea58c7ace0aa5e8216eec8 (patch) | |
tree | 725ff7c747d994741a9f3c70938f93e19aeb53fd /plugins/CloudFile/src/Services/google_api.h | |
parent | 26092086b62afd9bdef93f4756ae7558ec681e9a (diff) |
CloudFile: initial OneDrive implementation
Diffstat (limited to 'plugins/CloudFile/src/Services/google_api.h')
-rw-r--r-- | plugins/CloudFile/src/Services/google_api.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/CloudFile/src/Services/google_api.h b/plugins/CloudFile/src/Services/google_api.h index cf405dda36..50d12fc5d3 100644 --- a/plugins/CloudFile/src/Services/google_api.h +++ b/plugins/CloudFile/src/Services/google_api.h @@ -57,9 +57,9 @@ namespace GDriveAPI StartUploadFileRequest(const char *token, const char *name) : HttpRequest(REQUEST_POST, GDRIVE_UPLOAD) { - AddUrlParameter("access_token=%s", token); AddUrlParameter("uploadType=resumable"); + AddBearerAuthHeader(token); AddHeader("Content-Type", "application/json"); JSONNode params(JSON_NODE); @@ -91,7 +91,7 @@ namespace GDriveAPI CreateFolderRequest(const char *token, const char *path) : HttpRequest(REQUEST_PUT, GDRIVE_API) { - AddUrlParameter("access_token=%s", token); + AddBearerAuthHeader(token); AddHeader("Content-Type", "application/json"); JSONNode params(JSON_NODE); @@ -110,8 +110,7 @@ namespace GDriveAPI GrantPermissionsRequest(const char *token, const char *fileId) : HttpRequest(REQUEST_POST, FORMAT, GDRIVE_API "/%s/permissions", fileId) { - AddUrlParameter("access_token=%s", token); - + AddBearerAuthHeader(token); AddHeader("Content-Type", "application/json"); JSONNode params(JSON_NODE); |