Do i need to add any headers before making a post to server?
For example, Currently I'm trying to send a request along with the post data this way,
LPCWSTR post = L"name=User&subject=Hi&message=Hi";
if (!(WinHttpSendRequest( hRequest,
WINHTTP_NO_ADDITIONAL_HEADERS,
0, (LPVOID)post, wcslen(post),
wcslen(post), 0)))
{
//error
}
should this work?
I'd guess
\r\n
to your (narrow) string - I don't know if the API's going to add one since I assume you'd make the same call for binary data.