Quantcast
Channel: WE MOVED to github.com/microsoft/cpprestsdk. This site is not monitored!
Viewing all articles
Browse latest Browse all 4845

New Post: how to https Certification

$
0
0
I need a connection to a server with https and have two ".pem files". One for the certificate and one for the key. How can i include these files into my program? Without certification my code works fine. Example:
http_client_config client_config;
web_proxy wp(U("https://myProxy"));
client_config.set_proxy(wp);
http_client client(L"https://httpbin.org/post", client_config);

http_response resp = client.request(methods::POST,L"",L"This is the random text that I wish to send").get();

auto body = resp.extract_string().get();
std::wcout << body;
getch();
But i dont know how i can integrate the certification files. I hope that someone can help.

Viewing all articles
Browse latest Browse all 4845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>