diff options
author | George Hazan <ghazan@miranda.im> | 2016-12-29 00:01:38 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2016-12-29 00:01:38 +0300 |
commit | a956289416dd69108ce3b26b1a6d7ec8627576f4 (patch) | |
tree | 5091031cc121d0c8953c855103e019275314dc4d /protocols/Discord/src/http.cpp | |
parent | cc050575f27ecc736364749d1c5f47a7e3cdc991 (diff) |
login processing completed
Diffstat (limited to 'protocols/Discord/src/http.cpp')
-rw-r--r-- | protocols/Discord/src/http.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/protocols/Discord/src/http.cpp b/protocols/Discord/src/http.cpp index 3e513ee8d0..ed154569d3 100644 --- a/protocols/Discord/src/http.cpp +++ b/protocols/Discord/src/http.cpp @@ -49,17 +49,17 @@ AsyncHttpRequest::AsyncHttpRequest(CDiscordProto *ppro, int iRequestType, LPCSTR else m_szUrl = _url; flags = NLHRF_HTTP11 | NLHRF_REDIRECT | NLHRF_SSL; - if (ppro->m_szAccessToken == NULL) - flags |= NLHRF_NODUMPSEND; - else + if (ppro->m_szAccessToken != NULL) { + AddHeader("Authorization", ppro->m_szAccessToken); flags |= NLHRF_DUMPASTEXT; + } + else flags |= NLHRF_NODUMPSEND; + AddHeader("Content-Type", "application/json"); if (pRoot != NULL) { ptrW text(json_write(pRoot)); pData = mir_utf8encodeW(text); dataLength = (int)mir_strlen(pData); - - AddHeader("Content-Type", "application/json"); } requestType = iRequestType; |