diff options
author | George Hazan <george.hazan@gmail.com> | 2025-03-30 11:35:03 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2025-03-30 11:35:03 +0300 |
commit | 7d95e67308ee0abcce5c7bd66265146d3dfefd74 (patch) | |
tree | 9c377087518bb53a429151edb6a947fc47e89242 /protocols/Facebook/src/http.cpp | |
parent | 66821b916cc298111f9e5ddd2684d15ff7909f02 (diff) |
useful helper JsonReply moved to the core
Diffstat (limited to 'protocols/Facebook/src/http.cpp')
-rw-r--r-- | protocols/Facebook/src/http.cpp | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/protocols/Facebook/src/http.cpp b/protocols/Facebook/src/http.cpp index eaa91d8aff..033fc47b80 100644 --- a/protocols/Facebook/src/http.cpp +++ b/protocols/Facebook/src/http.cpp @@ -69,33 +69,6 @@ AsyncHttpRequest* operator<<(AsyncHttpRequest *pReq, const INT_PARAM ¶m) /////////////////////////////////////////////////////////////////////////////////////////
-JsonReply::JsonReply(MHttpResponse *pReply)
-{
- if (pReply == nullptr) {
- m_errorCode = 500;
- return;
- }
-
- m_errorCode = pReply->resultCode;
- if (m_errorCode != 200)
- return;
-
- m_root = json_parse(pReply->body);
- if (m_root == nullptr) {
- m_errorCode = 500;
- return;
- }
-
- m_errorCode = (*m_root)["error_code"].as_int();
-}
-
-JsonReply::~JsonReply()
-{
- json_delete(m_root);
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
AsyncHttpRequest* FacebookProto::CreateRequest(const char *url, const char *szName, const char *szMethod)
{
AsyncHttpRequest *pReq = new AsyncHttpRequest();
|