Sending a request using HTTPS in C ++

My C ++ application consists of sending via an HTTP connection directly to the Weblogic application server. You must modify it to publish using HTTPS.

* I run this application through Visual Studio. *

Any suggestions are welcome. Coding Updates Most Helpful

Below is the code that works fine for my HTTP connection.

What do I need to work with HTTPS?

strFormData = sFile; strHeaders = _T("Content-Type: application/x-www-form-urlencoded"); CInternetSession session; CHttpConnection* pConnection = session.GetHttpConnection(_T(Server), Port); CHttpFile* pFile = pConnection->OpenRequest(CHttpConnection::HTTP_VERB_POST, _T(Action)); result = pFile->SendRequest(strHeaders,(LPVOID)(LPCTSTR)strFormData, Data.GetLength()); 
+5
source share
1 answer
 CHttpFile* pFile = pConnection->OpenRequest(CHttpConnection::HTTP_VERB_POST, _T(Action), NULL, 1, NULL, NULL, INTERNET_FLAG_SECURE); 

I tried this code and it worked to host HTTPS. I found that the parametric values ​​(Safe Internet flag) vary depending on the publication of HTTP and HTTPS.

+4
source

All Articles