@@ -141,26 +141,37 @@ initialization.
141141``template <class ArgPack> client(ArgPack const & args) ``
142142 Pass in an argument pack. See supported parameters in the table below.
143143
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+
164175
165176To use the above supported named parameters, you'll have code that looks like
166177the following:
@@ -170,7 +181,9 @@ the following:
170181 using namespace boost::network: :http; // parameters are in this namespace
171182 boost::asio: :io_service my_io_service;
172183 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/");
174187 // use client _ as normal from here on out.
175188
176189HTTP Methods
0 commit comments