diff options
Diffstat (limited to 'protocols/NewsAggregator/Src')
-rw-r--r-- | protocols/NewsAggregator/Src/Utils.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/protocols/NewsAggregator/Src/Utils.cpp b/protocols/NewsAggregator/Src/Utils.cpp index c5f1df5b95..60aec00266 100644 --- a/protocols/NewsAggregator/Src/Utils.cpp +++ b/protocols/NewsAggregator/Src/Utils.cpp @@ -47,10 +47,9 @@ void NetlibUnInit() void GetNewsData(wchar_t *tszUrl, char **szData, MCONTACT hContact, CFeedEditor *pEditDlg) { Netlib_LogfW(hNetlibUser, L"Getting feed data %s.", tszUrl); - MHttpRequest nlhr; // initialize the netlib request - nlhr.requestType = REQUEST_GET; + MHttpRequest nlhr(REQUEST_GET); nlhr.flags = NLHRF_DUMPASTEXT | NLHRF_HTTP11 | NLHRF_REDIRECT; if (wcsstr(tszUrl, L"https://") != nullptr) nlhr.flags |= NLHRF_SSL; @@ -205,8 +204,7 @@ time_t DateToUnixTime(const char *stamp, bool FeedType) bool DownloadFile(LPCTSTR tszURL, LPCTSTR tszLocal) { - MHttpRequest nlhr; - nlhr.requestType = REQUEST_GET; + MHttpRequest nlhr(REQUEST_GET); nlhr.flags = NLHRF_DUMPASTEXT | NLHRF_HTTP11; nlhr.m_szUrl = _T2A(tszURL); nlhr.AddHeader("User-Agent", NETLIB_USER_AGENT); |