Skip to content
Permalink
Browse files

Fixed missing Content-Type in HTTP request

  • Loading branch information...
bear101 committed May 14, 2019
1 parent aba176e commit 3c27cd2e835e80ac8fc294d5b7247f5177a83ed1
Showing with 4 additions and 0 deletions.
  1. +4 −0 Client/TeamTalkClassic/HttpRequest.cpp
@@ -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()
@@ -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;

0 comments on commit 3c27cd2

Please sign in to comment.
You can’t perform that action at this time.