HTTPS and C ++ - Not an easy match?

I need to access an HTTPS-protected website (HTML or XML) from a C ++ MFC application, and I would like a simple solution. But I did a little research, and it seems to me that HTTPS and C ++ do not play well and easily together.

Is there a recommended class library for HTTPS web access? Should be easy to use and not too expensive.

+7
c ++ mfc
source share
3 answers

Libcurl has https support. Check out this example .

+6
source

Winnet

See example below.

... hOpen = InternetOpen (...); Connect = InternetConnect ( hOpen, // InternetOpen handle "MyHttpServer", // Server name INTERNET_DEFAULT_HTTPS_PORT,// Default HTTPS port - 443 "", // User name "", // User password INTERNET_SERVICE_HTTP, // Service 0, // Flags 0 // Context ); hReq = HttpOpenRequest ( hConnect, // InternetConnect handle "GET", // Method "", // Object name HTTP_VERSION, // Version "", // Referrer NULL, // Extra headers INTERNET_FLAG_SECURE, // Flags 0 // Context ); ... 
+5
source

For more information, see www.chilkatsoft.com. They have good, easy-to-use components to do similar things. Much easier to use than libcurl (or even wininet), and not expensive. I used their FTP / S component, very nice to use. Free trial.

0
source