summaryrefslogtreecommitdiff
path: root/protocols/Discord/src/connection.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2016-12-28 20:30:46 +0300
committerGeorge Hazan <ghazan@miranda.im>2016-12-28 20:30:46 +0300
commit3e34adae711d9ddf79b4959143a696b6a403a522 (patch)
treeaebc8cc38c164558e6da1d9c30971592045e1617 /protocols/Discord/src/connection.cpp
parente7a87b3c82204e048f23750a18b456e567a6f436 (diff)
first version that logs in successfully
Diffstat (limited to 'protocols/Discord/src/connection.cpp')
-rw-r--r--protocols/Discord/src/connection.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/protocols/Discord/src/connection.cpp b/protocols/Discord/src/connection.cpp
index 13a12129e2..df2479a2a4 100644
--- a/protocols/Discord/src/connection.cpp
+++ b/protocols/Discord/src/connection.cpp
@@ -107,10 +107,9 @@ bool CDiscordProto::TryToConnect(void)
ConnectionFailed(LOGINERR_WRONGPASSWORD);
return false;
}
-
- Push(new AsyncHttpRequest(this, REQUEST_GET, "/user/login", &CDiscordProto::OnReceiveToken)
- << WCHAR_PARAM("email", wszLogin)
- << WCHAR_PARAM("password", wszPassword));
+
+ JSONNode root; root << WCHAR_PARAM("email", wszLogin) << WCHAR_PARAM("password", wszPassword);
+ Push(new AsyncHttpRequest(this, REQUEST_POST, "/auth/login", &CDiscordProto::OnReceiveToken, &root));
return true;
}