Skip to content

Commit

Permalink
Fixed missing Content-Type in HTTP request
Browse files Browse the repository at this point in the history
  • Loading branch information
bear101 committed May 14, 2019
1 parent aba176e commit 3c27cd2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Client/TeamTalkClassic/HttpRequest.cpp
Expand Up @@ -53,6 +53,7 @@ CHttpRequest::CHttpRequest(const CString& url)
BSTR str = url.AllocSysString();
hr = m_pIXMLHttpRequest->open(_T("POST"), str, vAsync, vUser, vPassword);
ASSERT(hr == S_OK);

}

CHttpRequest::~CHttpRequest()
Expand Down Expand Up @@ -90,7 +91,10 @@ void CHttpRequest::Send(const CString& szRequest)
{
if(!m_pIXMLHttpRequest || m_state != HTTP_OPENED)
return;

HRESULT hr;
hr = m_pIXMLHttpRequest->setRequestHeader(_T("Content-Type"), _T("text/xml"));
ASSERT(SUCCEEDED(hr));

VARIANT vRequest;
vRequest.vt = VT_BSTR;
Expand Down

0 comments on commit 3c27cd2

Please sign in to comment.