Hello I'm using the WinHttpClient.h and I want to send some POST data in a body to the server, at the moment it only sends the parameters (REST) of the POST request, can you please tell me what can be the problem that the POST body is empty? Thank you in advance.
::WinHttpSendRequest(hRequest,
m_additionalRequestHeaders.c_str(), - wstring
m_additionalRequestHeaders.length(),
m_pDataToSend,- BYTE *
m_dataToSendSize,
m_dataToSendSize + m_additionalRequestHeaders.length(),
NULL);
The function is set to work synchronously.
::WinHttpOpen(m_userAgent.c_str(),
WINHTTP_ACCESS_TYPE_DEFAULT_PROXY,
WINHTTP_NO_PROXY_NAME,
WINHTTP_NO_PROXY_BYPASS,
0);
As you can see the post body is empty. The data is just for testing. No password or username has been compromised