diff options
Diffstat (limited to 'server/src/http_client.cpp')
| -rw-r--r-- | server/src/http_client.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/server/src/http_client.cpp b/server/src/http_client.cpp new file mode 100644 index 0000000..0f3d9e6 --- /dev/null +++ b/server/src/http_client.cpp | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | module; | ||
| 2 | |||
| 3 | #include <boost/asio/ssl.hpp> | ||
| 4 | #include <boost/beast/core.hpp> | ||
| 5 | #include <boost/beast/http.hpp> | ||
| 6 | |||
| 7 | module routemon:http.client$impl; | ||
| 8 | |||
| 9 | import :http.client; | ||
| 10 | |||
| 11 | namespace routemon::http { | ||
| 12 | |||
| 13 | client::client(net::io_context& ioc) : ioc_{ioc}, resolver_{ioc} | ||
| 14 | { | ||
| 15 | sslc_.set_default_verify_paths(); | ||
| 16 | sslc_.set_verify_mode( | ||
| 17 | net::ssl::verify_peer | net::ssl::verify_fail_if_no_peer_cert); | ||
| 18 | } | ||
| 19 | |||
| 20 | } // namespace routemon::http | ||