diff options
author | George Hazan <ghazan@miranda.im> | 2019-01-28 15:51:04 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-01-28 15:51:04 +0300 |
commit | ac6607c5f76566c2c840ca3955a22448738df9b3 (patch) | |
tree | b697dbe07b88ac8fefb5f00a003c95710b3bbbeb /plugins/CloudFile/src/Services | |
parent | e787987f54733bd58f69ced43a506aa7fc42fb7c (diff) |
mir_urlDecode & mir_urlEncode to return CMStringA
Diffstat (limited to 'plugins/CloudFile/src/Services')
-rw-r--r-- | plugins/CloudFile/src/Services/microsoft_api.h | 8 | ||||
-rw-r--r-- | plugins/CloudFile/src/Services/yandex_api.h | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/plugins/CloudFile/src/Services/microsoft_api.h b/plugins/CloudFile/src/Services/microsoft_api.h index 62a2204459..6c22ac512f 100644 --- a/plugins/CloudFile/src/Services/microsoft_api.h +++ b/plugins/CloudFile/src/Services/microsoft_api.h @@ -48,7 +48,7 @@ namespace OneDriveAPI { public: UploadFileRequest(const char *token, const char *name, const char *data, size_t size, OnConflict strategy = NONE) : - HttpRequest(REQUEST_PUT, FORMAT, ONEDRIVE_API "/special/approot:/%s:/content", ptrA(mir_urlEncode(name))) + HttpRequest(REQUEST_PUT, FORMAT, ONEDRIVE_API "/special/approot:/%s:/content", mir_urlEncode(name).c_str()) { AddUrlParameter("select=id"); @@ -63,7 +63,7 @@ namespace OneDriveAPI } UploadFileRequest(const char *token, const char *parentId, const char *name, const char *data, size_t size, OnConflict strategy = NONE) : - HttpRequest(REQUEST_PUT, FORMAT, ONEDRIVE_API "/items/%s:/%s:/content", parentId, ptrA(mir_urlEncode(name))) + HttpRequest(REQUEST_PUT, FORMAT, ONEDRIVE_API "/items/%s:/%s:/content", parentId, mir_urlEncode(name).c_str()) { AddUrlParameter("select=id"); @@ -82,7 +82,7 @@ namespace OneDriveAPI { public: CreateUploadSessionRequest(const char *token, const char *name, OnConflict strategy = NONE) : - HttpRequest(REQUEST_POST, FORMAT, ONEDRIVE_API "/special/approot:/%s:/createUploadSession", ptrA(mir_urlEncode(name))) + HttpRequest(REQUEST_POST, FORMAT, ONEDRIVE_API "/special/approot:/%s:/createUploadSession", mir_urlEncode(name).c_str()) { AddBearerAuthHeader(token); AddHeader("Content-Type", "application/json"); @@ -102,7 +102,7 @@ namespace OneDriveAPI } CreateUploadSessionRequest(const char *token, const char *parentId, const char *name, OnConflict strategy = NONE) : - HttpRequest(REQUEST_POST, FORMAT, ONEDRIVE_API "/items/%s:/%s:/createUploadSession", parentId, ptrA(mir_urlEncode(name))) + HttpRequest(REQUEST_POST, FORMAT, ONEDRIVE_API "/items/%s:/%s:/createUploadSession", parentId, mir_urlEncode(name).c_str()) { AddBearerAuthHeader(token); AddHeader("Content-Type", "application/json"); diff --git a/plugins/CloudFile/src/Services/yandex_api.h b/plugins/CloudFile/src/Services/yandex_api.h index ac99cb0177..c7c3dfe19d 100644 --- a/plugins/CloudFile/src/Services/yandex_api.h +++ b/plugins/CloudFile/src/Services/yandex_api.h @@ -60,7 +60,7 @@ namespace YandexAPI HttpRequest(REQUEST_GET, YADISK_API "/upload") { AddOAuthHeader(token); - AddUrlParameter("path=app:%s", ptrA(mir_urlEncode(path))); + AddUrlParameter("path=app:%s", mir_urlEncode(path).c_str()); AddUrlParameter("fields=href"); if (strategy == OnConflict::REPLACE) AddUrlParameter("overwrite=true"); @@ -111,7 +111,7 @@ namespace YandexAPI HttpRequest(REQUEST_PUT, YADISK_API "/publish") { AddOAuthHeader(token); - AddUrlParameter("path=app:%s", ptrA(mir_urlEncode(path))); + AddUrlParameter("path=app:%s", mir_urlEncode(path).c_str()); } }; @@ -122,7 +122,7 @@ namespace YandexAPI HttpRequest(REQUEST_GET, YADISK_API) { AddOAuthHeader(token); - AddUrlParameter("path=app:%s", ptrA(mir_urlEncode(path))); + AddUrlParameter("path=app:%s", mir_urlEncode(path).c_str()); AddUrlParameter("fields=public_url"); } }; |