File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -15,11 +15,13 @@ Simple examples
1515#### Server
1616
1717``` c++
18+ #define CPPHTTPLIB_OPENSSL_SUPPORT
19+ #include " path/to/httplib.h"
20+
1821// HTTP
1922httplib::Server svr;
2023
2124// HTTPS
22- #define CPPHTTPLIB_OPENSSL_SUPPORT
2325httplib::SSLServer svr;
2426
2527svr.Get(" /hi" , [](const httplib::Request &, httplib::Response &res) {
@@ -32,11 +34,13 @@ svr.listen("0.0.0.0", 8080);
3234#### Client
3335
3436``` c++
37+ #define CPPHTTPLIB_OPENSSL_SUPPORT
38+ #include " path/to/httplib.h"
39+
3540// HTTP
3641httplib::Client cli ("http://cpp-httplib-server.yhirose.repl.co ");
3742
3843// HTTPS
39- #define CPPHTTPLIB_OPENSSL_SUPPORT
4044httplib::Client cli("https://cpp-httplib-server.yhirose.repl.co ");
4145
4246auto res = cli.Get("/hi");
@@ -711,6 +715,7 @@ NOTE: cpp-httplib currently supports only version 1.1.1.
711715
712716```c++
713717#define CPPHTTPLIB_OPENSSL_SUPPORT
718+ #include "path/to/httplib.h"
714719
715720// Server
716721httplib::SSLServer svr("./cert.pem", "./key.pem");
You can’t perform that action at this time.
0 commit comments