Send 0000 instead of an empty HTTP request.
Provide the request data for single writes in WinHttpSendRequest instead of calling WinHttpWriteData so that WinHttp can resend the request if needed.