diff options
Diffstat (limited to 'protocols/Gadu-Gadu/src')
-rw-r--r-- | protocols/Gadu-Gadu/src/avatar.cpp | 9 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/src/oauth.cpp | 9 |
2 files changed, 6 insertions, 12 deletions
diff --git a/protocols/Gadu-Gadu/src/avatar.cpp b/protocols/Gadu-Gadu/src/avatar.cpp index c9887a1da4..0bfce1c00c 100644 --- a/protocols/Gadu-Gadu/src/avatar.cpp +++ b/protocols/Gadu-Gadu/src/avatar.cpp @@ -51,8 +51,7 @@ bool GaduProto::getAvatarFileInfo(uin_t uin, char **avatarurl, char **avatarts) char szUrl[128];
mir_snprintf(szUrl, "http://api.gadu-gadu.pl/avatars/%d/0.xml", uin);
- MHttpRequest req;
- req.requestType = REQUEST_GET;
+ MHttpRequest req(REQUEST_GET);
req.m_szUrl = szUrl;
req.flags = NLHRF_NODUMP | NLHRF_HTTP11 | NLHRF_REDIRECT;
@@ -225,8 +224,7 @@ void __cdecl GaduProto::avatarrequestthread(void*) ai.hContact = data->hContact;
ai.format = getByte(ai.hContact, GG_KEY_AVATARTYPE, GG_KEYDEF_AVATARTYPE);
- MHttpRequest req;
- req.requestType = REQUEST_GET;
+ MHttpRequest req(REQUEST_GET);
req.m_szUrl = data->szAvatarURL;
req.flags = NLHRF_NODUMP | NLHRF_HTTP11 | NLHRF_REDIRECT;
@@ -372,8 +370,7 @@ void __cdecl GaduProto::setavatarthread(void *param) char* token = getStringA(GG_KEY_TOKEN);
// construct request
- MHttpRequest req = {};
- req.requestType = REQUEST_POST;
+ MHttpRequest req(REQUEST_POST);
req.m_szUrl = "http://avatars.nowe.gg/upload";
req.flags = NLHRF_NODUMP | NLHRF_HTTP11;
req.AddHeader("X-Request", "JSON");
diff --git a/protocols/Gadu-Gadu/src/oauth.cpp b/protocols/Gadu-Gadu/src/oauth.cpp index 084b4df1bf..70f145ce33 100644 --- a/protocols/Gadu-Gadu/src/oauth.cpp +++ b/protocols/Gadu-Gadu/src/oauth.cpp @@ -283,8 +283,7 @@ int GaduProto::oauth_receivetoken() NLHR_PTR resp(0);
{
- MHttpRequest req;
- req.requestType = REQUEST_POST;
+ MHttpRequest req(REQUEST_POST);
req.m_szUrl = "http://api.gadu-gadu.pl/request_token";
req.flags = NLHRF_NODUMP | NLHRF_HTTP11 | NLHRF_PERSISTENT;
req.AddHeader("User-Agent", GG8_VERSION);
@@ -313,8 +312,7 @@ int GaduProto::oauth_receivetoken() // 2. Obtaining User Authorization
debugLogA("oauth_receivetoken(): Obtaining User Authorization...");
{
- MHttpRequest req;
- req.requestType = REQUEST_POST;
+ MHttpRequest req(REQUEST_POST);
req.m_szUrl = "https://login.gadu-gadu.pl/authorize";
req.flags = NLHRF_NODUMP | NLHRF_HTTP11;
req.m_szParam.Format("callback_url=%s&request_token=%s&uin=%s&password=%s", ptrA(oauth_uri_escape("http://www.mojageneracja.pl")), token, uin, password);
@@ -335,8 +333,7 @@ int GaduProto::oauth_receivetoken() token = nullptr;
token_secret = nullptr;
{
- MHttpRequest req;
- req.requestType = REQUEST_POST;
+ MHttpRequest req(REQUEST_POST);
req.m_szUrl = "http://api.gadu-gadu.pl/access_token";
req.flags = NLHRF_NODUMP | NLHRF_HTTP11 | NLHRF_PERSISTENT;
req.nlc = nlc;
|