From 85b4abbf16079dd550b5e0e97f5f2fbea88e0972 Mon Sep 17 00:00:00 2001 From: yhirose Date: Thu, 7 Jan 2021 19:56:33 -0500 Subject: [PATCH] Updated the simple example --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4bfc83d..60c995f 100644 --- a/README.md +++ b/README.md @@ -15,11 +15,13 @@ Simple examples #### Server ```c++ +#define CPPHTTPLIB_OPENSSL_SUPPORT +#include "path/to/httplib.h" + // HTTP httplib::Server svr; // HTTPS -#define CPPHTTPLIB_OPENSSL_SUPPORT httplib::SSLServer svr; svr.Get("/hi", [](const httplib::Request &, httplib::Response &res) { @@ -32,11 +34,13 @@ svr.listen("0.0.0.0", 8080); #### Client ```c++ +#define CPPHTTPLIB_OPENSSL_SUPPORT +#include "path/to/httplib.h" + // HTTP httplib::Client cli("http://cpp-httplib-server.yhirose.repl.co"); // HTTPS -#define CPPHTTPLIB_OPENSSL_SUPPORT httplib::Client cli("https://cpp-httplib-server.yhirose.repl.co"); auto res = cli.Get("/hi"); @@ -711,6 +715,7 @@ NOTE: cpp-httplib currently supports only version 1.1.1. ```c++ #define CPPHTTPLIB_OPENSSL_SUPPORT +#include "path/to/httplib.h" // Server httplib::SSLServer svr("./cert.pem", "./key.pem");