Hi,
I want to POST data using WinInet on HTTPS(SSL), web service. I have used following sequence of function calls with all the required parameter.
I have checked the return value for all the functions and it returns true for all functions. My request reaches the web service properly but the strange thing is web service is not getting the DATA i have sent using POST method.
One observation from my side is, even though HttpOpenRequest() returns NON NULL value(mean success), If I try to read GetLastError(), it gives 122 error saying insufficient buffer. My URL is hardy of 50 characters.
Can any one help me out understanding what seems to be the problem.
HINTERNET connect = InternetOpen("MyBrowser",INTERNET_OPEN_TYPE_PRECONFIG,NULL, NULL, 0);
Connection = InternetConnect(Initialize, L"abc.efg.com", INTERNET_DEFAULT_HTTPS_PORT, NULL, NULL, INTERNET_SERVICE_HTTP, 0, 0);
File = HttpOpenRequest(
Connection,
L"POST",
L"/MyService",
L"HTTP/1.0",
NULL,
NULL,
INTERNET_FLAG_SECURE,
0);
bool res = HttpSendRequest(
File, (LPCWSTR)hdrs,
0,
(char*)frmdata, dataLen);
Please help
Regards,
Mahesh