summaryrefslogtreecommitdiff
path: root/protocols/GmailNotifier
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-01-09 13:13:23 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-01-09 13:13:23 +0300
commit110fdc1157d94f5d787a21c60163681767fdd6c4 (patch)
tree3a401fa5b6d10e397784f4a7aa1cda38beee9fb9 /protocols/GmailNotifier
parent74c01c7fb7862ec01ad27c4b225b08b7aa0f3b0a (diff)
more strict constructor of MHttpRequest to avoid quirks
Diffstat (limited to 'protocols/GmailNotifier')
-rw-r--r--protocols/GmailNotifier/src/check.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/protocols/GmailNotifier/src/check.cpp b/protocols/GmailNotifier/src/check.cpp
index df86f3fa0d..34a123390c 100644
--- a/protocols/GmailNotifier/src/check.cpp
+++ b/protocols/GmailNotifier/src/check.cpp
@@ -67,10 +67,9 @@ void CheckMailInbox(Account *curAcc)
szBody.Append("&password=");
szBody.Append(curAcc->pass);
- MHttpRequest nlhr;
+ MHttpRequest nlhr(REQUEST_POST);
nlhr.m_szUrl = szUrl.GetBuffer();
nlhr.m_szParam = szBody;
- nlhr.requestType = REQUEST_POST;
nlhr.AddHeader("Content-Type", "application/x-www-form-urlencoded");
NLHR_PTR nlu(Netlib_HttpTransaction(hNetlibUser, &nlhr));
@@ -93,9 +92,8 @@ void CheckMailInbox(Account *curAcc)
else
szUrl.Append("/mail/feed/atom");
- MHttpRequest nlhr;
- nlhr.m_szUrl = szUrl.GetBuffer();
- nlhr.requestType = REQUEST_GET;
+ MHttpRequest nlhr(REQUEST_GET);
+ nlhr.m_szUrl = szUrl;
nlhr.AddHeader("Authorization", szAuth.GetBuffer());
NLHR_PTR nlu(Netlib_HttpTransaction(hNetlibUser, &nlhr));