88
99#include < cstdint>
1010#include < algorithm>
11+ #include < string>
12+ #include < vector>
13+ #include < chrono>
1114
1215namespace network {
1316namespace http {
@@ -17,7 +20,7 @@ namespace v2 {
1720public:
1821
1922// default timeout is 30 seconds
20- constexpr client_options ()
23+ client_options ()
2124 : follow_redirects_(false )
2225 , cache_resolved_(false )
2326 , use_proxy_(false )
@@ -36,14 +39,16 @@ namespace v2 {
3639std::swap (cache_resolved_, other.cache_resolved_ );
3740std::swap (use_proxy_, other.use_proxy_ );
3841std::swap (timeout_, other.timeout_ );
42+ std::swap (openssl_certificate_paths_, other.openssl_certificate_paths_ );
43+ std::swap (openssl_verify_paths_, other.openssl_verify_paths_ );
3944 }
4045
4146 client_options &follow_redirects (bool follow_redirects)noexcept {
4247 follow_redirects_ = follow_redirects;
4348return *this ;
4449 }
4550
46- constexpr bool follow_redirects ()const noexcept {
51+ bool follow_redirects ()const noexcept {
4752return follow_redirects_;
4853 }
4954
@@ -52,7 +57,7 @@ namespace v2 {
5257return *this ;
5358 }
5459
55- constexpr bool cache_resolved ()const noexcept {
60+ bool cache_resolved ()const noexcept {
5661return cache_resolved_;
5762 }
5863
@@ -61,25 +66,35 @@ namespace v2 {
6166return *this ;
6267 }
6368
64- constexpr bool use_proxy ()const noexcept {
69+ bool use_proxy ()const noexcept {
6570return use_proxy_;
6671 }
6772
68- client_options &timeout (std::uint64_t timeout)noexcept {
73+ client_options &timeout (std::chrono::milliseconds timeout)noexcept {
6974 timeout_ = timeout;
7075return *this ;
7176 }
7277
73- constexpr std::uint64_t timeout ()const noexcept {
78+ std::chrono::milliseconds timeout ()const noexcept {
7479return timeout_;
7580 }
7681
82+ std::vector<std::string>openssl_certificate_paths ()const {
83+ return openssl_certificate_paths_;
84+ }
85+
86+ std::vector<std::string>openssl_verify_paths ()const {
87+ return openssl_verify_paths_;
88+ }
89+
7790private:
7891
7992bool follow_redirects_;
8093bool cache_resolved_;
8194bool use_proxy_;
82- std::uint64_t timeout_;
95+ std::chrono::milliseconds timeout_;
96+ std::vector<std::string> openssl_certificate_paths_;
97+ std::vector<std::string> openssl_verify_paths_;
8398
8499 };
85100}// namespace v2