diff options
author | George Hazan <george.hazan@gmail.com> | 2024-01-05 15:54:03 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-01-05 15:54:03 +0300 |
commit | 14c4e44a0a91e1ad701d4ae3c58185d25118e64e (patch) | |
tree | 50f36035466f355c74373e757bc00b6610ce6267 /protocols/CloudFile/src/Services/yandex_service.cpp | |
parent | 94667140aeb3886d22e4c1301423fe99aaf3fba4 (diff) |
Netlib:
- NETLIBHTTPHEADER & NETLIBHTTPREQUEST obsoleted;
- NETLIBHTTPREQUEST divided into MHttpRequest & MHttpResponse;
- MHttpHeaders now manager headers both for MHttpRequest & MHttpResponse;
Diffstat (limited to 'protocols/CloudFile/src/Services/yandex_service.cpp')
-rw-r--r-- | protocols/CloudFile/src/Services/yandex_service.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/protocols/CloudFile/src/Services/yandex_service.cpp b/protocols/CloudFile/src/Services/yandex_service.cpp index f21e9ef2e0..892821e0c4 100644 --- a/protocols/CloudFile/src/Services/yandex_service.cpp +++ b/protocols/CloudFile/src/Services/yandex_service.cpp @@ -102,8 +102,8 @@ void CYandexService::RequestAccessTokenThread(void *param) NLHR_PTR response(request.Send(m_hConnection)); if (response == nullptr || response->resultCode != HTTP_CODE_OK) { - const char *error = response->dataLength - ? response->pData + const char *error = response->body.GetLength() + ? response->body : HttpStatusToError(response->resultCode); Netlib_Logf(m_hConnection, "%s: %s", GetAccountName(), error); @@ -112,7 +112,7 @@ void CYandexService::RequestAccessTokenThread(void *param) return; } - JSONNode root = JSONNode::parse(response->pData); + JSONNode root = JSONNode::parse(response->body); if (root.empty()) { Netlib_Logf(m_hConnection, "%s: %s", GetAccountName(), HttpStatusToError(response->resultCode)); ShowNotification(TranslateT("Server does not respond"), MB_ICONERROR); |