Skip to content

Commit 85b4abb

Browse files
committed
Updated the simple example
1 parent e42a358 commit 85b4abb

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff 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
1922
httplib::Server svr;
2023

2124
// HTTPS
22-
#define CPPHTTPLIB_OPENSSL_SUPPORT
2325
httplib::SSLServer svr;
2426

2527
svr.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
3641
httplib::Client cli("http://cpp-httplib-server.yhirose.repl.co");
3742

3843
// HTTPS
39-
#define CPPHTTPLIB_OPENSSL_SUPPORT
4044
httplib::Client cli("https://cpp-httplib-server.yhirose.repl.co");
4145

4246
auto 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
716721
httplib::SSLServer svr("./cert.pem", "./key.pem");

0 commit comments

Comments
 (0)