Skip to content

Commit 3482012

Browse files
committed
Fix documentation of BOOST_NETWORK_ENABLE_HTTPS
Fixes cpp-netlib#429 Addresses comments by @povilasb on improvements to previous PR that documents the circumstances where BOOST_NETWORK_ENABLE_HTTPS would be set and be useful.
1 parent 01743e2 commit 3482012

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

libs/network/doc/getting_started.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,13 @@ additional parameters::
133133

134134
If you intend to use the SSL support when using the HTTP client libraries in
135135
:mod:`cpp-netlib`, you may need to build it with OpenSSL_ installed or at least
136-
available to CMake. One example for building the library with OpenSSL_ support
137-
is by doing the following::
136+
available to CMake. If you have the development headers for OpenSSL_ installed
137+
on your system when you build :mod:`cpp-netlib`, CMake will be able to detect it
138+
and set the ``BOOST_NETWORK_ENABLE_HTTPS`` macro when building the library to
139+
support HTTPS URIs.
140+
141+
One example for building the library with OpenSSL_ support with a custom
142+
(non-installed) version of OpenSSL_ is by doing the following::
138143

139144
$ cmake -DCMAKE_BUILD_TYPE=Debug \
140145
> -DCMAKE_C_COMPILER=clang \

libs/network/doc/reference/http_client.rst

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,19 @@ only in the following situations:
3939
code.** It is best to define this either at compile-time of all code using
4040
the library, or before including any of the client headers.
4141

42-
.. _OpenSSL: http://www.openssl.org/
42+
To use the client implementations that support HTTPS URIs, you may explicitly
43+
do the following:
44+
45+
.. code-block:: c++
4346

47+
#define BOOST_NETWORK_ENABLE_HTTPS
48+
#include <boost/network/include/http/client.hpp>
49+
50+
This forces HTTPS support to be enabled and forces a dependency on OpenSSL_.
51+
This dependency is imposed by `Boost.Asio`_
52+
53+
.. _OpenSSL: http://www.openssl.org/
54+
.. _`Boost.Asio`: http://www.boost.org/libs/asio
4455

4556
Implementations
4657
---------------

0 commit comments

Comments
 (0)