@@ -141,26 +141,37 @@ initialization.
141
141
``template <class ArgPack> client(ArgPack const & args) ``
142
142
Pass in an argument pack. See supported parameters in the table below.
143
143
144
- +-------------------+-------------------------------+-------------------------+
145
- | Parameter Name | Type | Description |
146
- +===================+===============================+=========================+
147
- | _follow_redirects | ``bool `` | Boolean to specify |
148
- | | | whether the client |
149
- | | | should follow HTTP |
150
- | | | redirects. Default is |
151
- | | | ``false ``. |
152
- +-------------------+-------------------------------+-------------------------+
153
- | _cache_resolved | ``bool `` | Boolean to specify |
154
- | | | whether the client |
155
- | | | should cache resolved |
156
- | | | endpoints. The default |
157
- | | | is ``false ``. |
158
- +-------------------+-------------------------------+-------------------------+
159
- | _io_service | ``boost::asio::io_service & `` | Reference to an |
160
- | | | instance of a |
161
- | | | Boost.Asio |
162
- | | | ``io_service ``. |
163
- +-------------------+-------------------------------+-------------------------+
144
+ +----------------------+-------------------------------+-------------------------+
145
+ | Parameter Name | Type | Description |
146
+ +======================+===============================+=========================+
147
+ | _follow_redirects | ``bool `` | Boolean to specify |
148
+ | | | whether the client |
149
+ | | | should follow HTTP |
150
+ | | | redirects. Default is |
151
+ | | | ``false ``. |
152
+ +----------------------+-------------------------------+-------------------------+
153
+ | _cache_resolved | ``bool `` | Boolean to specify |
154
+ | | | whether the client |
155
+ | | | should cache resolved |
156
+ | | | endpoints. The default |
157
+ | | | is ``false ``. |
158
+ +----------------------+-------------------------------+-------------------------+
159
+ | _io_service | ``boost::asio::io_service & `` | Reference to an |
160
+ | | | instance of a |
161
+ | | | Boost.Asio |
162
+ | | | ``io_service ``. |
163
+ +----------------------+-------------------------------+-------------------------+
164
+ | _openssl_certificate | string | The filename of the |
165
+ | | | certificate to load for |
166
+ | | | the SSL connection for |
167
+ | | | verification. |
168
+ +----------------------+-------------------------------+-------------------------+
169
+ | _openssl_verify_path | string | The directory from |
170
+ | | | which the certificate |
171
+ | | | authority files are |
172
+ | | | located. |
173
+ +----------------------+-------------------------------+-------------------------+
174
+
164
175
165
176
To use the above supported named parameters, you'll have code that looks like
166
177
the following:
@@ -170,7 +181,9 @@ the following:
170
181
using namespace boost::network: :http; // parameters are in this namespace
171
182
boost::asio: :io_service my_io_service;
172
183
client client_(_follow_redirects=true, _cache_resolved=true,
173
- _io_service=my_io_service);
184
+ _io_service=my_io_service
185
+ , _openssl_certificate="/tmp/my-cert"
186
+ , _openssl_verify_path="/tmp/ca-certs/");
174
187
// use client _ as normal from here on out.
175
188
176
189
HTTP Methods
0 commit comments