Fixed build errors with some examples

This commit is contained in:
yhirose 2020-05-16 00:50:52 -04:00
parent b9a9df4d73
commit 66f698fab6
2 changed files with 13 additions and 10 deletions

View file

@ -14,13 +14,12 @@ using namespace std;
int main(void) {
#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
httplib::url::Options options;
options.ca_cert_file_path = CA_CERT_FILE;
// options.server_certificate_verification = true;
auto res = httplib::url::Get("https://localhost:8080/hi", options);
auto res = httplib::Client2("https://localhost:8080")
.set_ca_cert_path(CA_CERT_FILE)
// .enable_server_certificate_verification(true)
.Get("/hi");
#else
auto res = httplib::url::Get("http://localhost:8080/hi");
auto res = httplib::Client2("http://localhost:8080").Get("/hi");
#endif
if (res) {