Hello, wellwell, you wrote:
>>>> Call HttpSendRequest (), for request "PUT", returns FALSE, GetLastError () = ERROR_HTTP_HEADER_NOT_FOUND.
>>>> Tried to add in an explicit form Content-Length does not help. That can not suffice it?
>> W> And you it is exact PUT it is necessary? Can POST?
>> In the documentation has been written to use PUT. And even if POST works, it would be desirable to understand in what business...
W> Well as the variant, the server can not support PUT (though it should then to return METHOD_NOT_ALLOWED). Show the code completely.
The error is returned explicitly __ reversal to the server, at once WinInet.
HINTERNET hRequest = HttpOpenRequest (m_hConnect, pData? "PUT": "GET", "/interface/simple", "HTTP/1.1", NULL,
NULL, INTERNET_FLAG_NO_CACHE_WRITE|INTERNET_FLAG_NO_COOKIES|INTERNET_FLAG_RELOAD, 0);
HttpAddRequestHeaders (hRequest, ("Content-Length:" + FormatStr ("%d", dwSize)).c_str (),-1, HTTP_ADDREQ_FLAG_ADD);
f (! HttpSendRequest (hRequest, szHeaders, szHeaders?-1: 0, pData, dwSize)) return GetLastError ();