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
15
15
#### Server
16
16
17
17
``` c++
18
+ #define CPPHTTPLIB_OPENSSL_SUPPORT
19
+ #include " path/to/httplib.h"
20
+
18
21
// HTTP
19
22
httplib::Server svr;
20
23
21
24
// HTTPS
22
- #define CPPHTTPLIB_OPENSSL_SUPPORT
23
25
httplib::SSLServer svr;
24
26
25
27
svr.Get(" /hi" , [](const httplib::Request &, httplib::Response &res) {
@@ -32,11 +34,13 @@ svr.listen("0.0.0.0", 8080);
32
34
#### Client
33
35
34
36
``` c++
37
+ #define CPPHTTPLIB_OPENSSL_SUPPORT
38
+ #include " path/to/httplib.h"
39
+
35
40
// HTTP
36
41
httplib::Client cli ("http://cpp-httplib-server.yhirose.repl.co ");
37
42
38
43
// HTTPS
39
- #define CPPHTTPLIB_OPENSSL_SUPPORT
40
44
httplib::Client cli("https://cpp-httplib-server.yhirose.repl.co ");
41
45
42
46
auto res = cli.Get("/hi");
@@ -711,6 +715,7 @@ NOTE: cpp-httplib currently supports only version 1.1.1.
711
715
712
716
```c++
713
717
#define CPPHTTPLIB_OPENSSL_SUPPORT
718
+ #include "path/to/httplib.h"
714
719
715
720
// Server
716
721
httplib::SSLServer svr("./cert.pem", "./key.pem");
You can’t perform that action at this time.
0 commit comments