Skip to content

Fixes failing timeout test. #254

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jun 27, 2013
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Generate documentation for 0.9.5
  • Loading branch information
deanberris committed Feb 5, 2013
commit eb71d7baa2f3e8bf8aaa76b59210f4896270ad9a
2 changes: 1 addition & 1 deletion libs/network/doc/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 2782e6e8740d26e9cc1f54812c829fe8
config: 08239cf2918f3b576f229180a785211f
tags: fbb0d17656682115ca4d033fb2f83ba1
Binary file added libs/network/doc/html/.doctrees/contents.doctree
Binary file not shown.
Binary file not shown.
Binary file added libs/network/doc/html/.doctrees/examples.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added libs/network/doc/html/.doctrees/history.doctree
Binary file not shown.
Binary file added libs/network/doc/html/.doctrees/in_depth.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added libs/network/doc/html/.doctrees/index.doctree
Binary file not shown.
Binary file added libs/network/doc/html/.doctrees/reference.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added libs/network/doc/html/.doctrees/whats_new.doctree
Binary file not shown.
3 changes: 2 additions & 1 deletion libs/network/doc/html/_sources/contents.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ Contents
--------

.. toctree::
:maxdepth: 3
:maxdepth: 4

index.rst
whats_new.rst
getting_started.rst
examples.rst
Expand Down
2 changes: 1 addition & 1 deletion libs/network/doc/html/_sources/getting_started.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Getting Boost
=============

:mod:`cpp-netlib` depends on Boost_. It should work for any version
of Boost above 1.45.0. If Boost is not installed on your system, the
of Boost above 1.50.0. If Boost is not installed on your system, the
latest package can be found on the `Boost web-site`_. The environment
variable ``BOOST_ROOT`` must be defined, which must be the full path
name of the top directory of the Boost distribution. Although Boost
Expand Down
33 changes: 10 additions & 23 deletions libs/network/doc/html/_sources/index.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,22 @@
.. rubric:: Straightforward network programming in modern C++

.. :Authors: Glyn Matthews <glyn.matthews@gmail.com>
.. Dean Michael Berris <mikhailberis@gmail.com>
.. :Date: Feb 22, 2012
.. :Version: 0.9.4
.. Dean Michael Berris <dberris@google.com>
.. :Date: Feb 2, 2013
.. :Version: 0.9.5
.. :Description: Complete user documentation, with examples, for the :mod:`cpp-netlib`.
.. :Copyright: Copyright Glyn Matthews, Dean Michael Berris 2008-2012.
.. Copyrigh 2013 Google, Inc.
.. Distributed under the Boost Software License, Version
.. 1.0. (See accompanying file LICENSE_1_0.txt or copy at
.. http://www.boost.org/LICENSE_1_0.txt)

Getting cpp-netlib
==================

You can find out more about the :mod:`cpp-netlib` project at
http://cpp-netlib.org/.

**Download**

You can download the latest releases of the library at:
Expand All @@ -39,25 +43,12 @@ You can also file issues on the Github_ issue tracker at:
We are a growing community and we are happy to accept new
contributions and ideas.

Boost
=====

The :mod:`cpp-netlib` is being developed for eventual submission to Boost_.

.. image:: _static/boost.png
:align: left

C++ Network Library
===================

The :mod:`cpp-netlib` is a library that provides application layer
protocol support using modern C++ techniques. It is light-weight,
fast, portable and is intended to be as easy to configure as possible.

It is developed by people linked to the Boost_ community and will soon
be submitted for review into Boost. A presentation about
:mod:`cpp-netlib` was given at `BoostCon 2010`_, for which the
`slides`_ and the `paper`_ can be found on-line.
:mod:`cpp-netlib` is a library collection that provides application layer
protocol support using modern C++ techniques. It is light-weight, fast,
portable and is intended to be as easy to configure as possible.

Hello, world!
=============
Expand Down Expand Up @@ -123,9 +114,5 @@ Want to learn more?


.. _Boost: http://www.boost.org/
.. _`BoostCon 2010`: http://www.boostcon.com/
.. _`slides`: http://www.filetolink.com/b0e89d06
.. _`paper`: http://github.com/downloads/mikhailberis/cpp-netlib-boostcon-paper/cpp-netlib.pdf
.. _Git: http://git-scm.com/
.. _GitHub: http://github.com/

54 changes: 27 additions & 27 deletions libs/network/doc/html/_sources/reference/http_client.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,37 +139,35 @@ initialization.

``client()``
Default constructor.
``client(boost::asio::io_service & io_service)``
Construct a client to use an existing Boost.Asio ``io_service`` instance.
``template <class ArgPack> client(ArgPack const & args)``
Pass in an argument pack. See supported parameters in the table below.
``explicit client(client::options const &)``
Constructor taking a ``client_options<Tag>`` object. The following table
shows the options you can set on a ``client_options<Tag>`` instance.

+----------------------+-------------------------------+-------------------------+
| Parameter Name | Type | Description |
+======================+===============================+=========================+
| _follow_redirects | ``bool`` | Boolean to specify |
| follow_redirects | ``bool`` | Boolean to specify |
| | | whether the client |
| | | should follow HTTP |
| | | redirects. Default is |
| | | ``false``. |
+----------------------+-------------------------------+-------------------------+
| _cache_resolved | ``bool`` | Boolean to specify |
| cache_resolved | ``bool`` | Boolean to specify |
| | | whether the client |
| | | should cache resolved |
| | | endpoints. The default |
| | | is ``false``. |
+----------------------+-------------------------------+-------------------------+
| _io_service | ``boost::asio::io_service &`` | Reference to an |
| | | instance of a |
| io_service | ``shared_ptr<io_service>`` | Shared pointer to a |
| | | Boost.Asio |
| | | ``io_service``. |
+----------------------+-------------------------------+-------------------------+
| _openssl_certificate | string | The filename of the |
| openssl_certificate | string | The filename of the |
| | | certificate to load for |
| | | the SSL connection for |
| | | verification. |
+----------------------+-------------------------------+-------------------------+
| _openssl_verify_path | string | The directory from |
| openssl_verify_path | string | The directory from |
| | | which the certificate |
| | | authority files are |
| | | located. |
Expand All @@ -182,11 +180,13 @@ the following:
.. code-block:: c++

using namespace boost::network::http; // parameters are in this namespace
boost::asio::io_service my_io_service;
client client_(_follow_redirects=true, _cache_resolved=true,
_io_service=my_io_service
, _openssl_certificate="/tmp/my-cert"
, _openssl_verify_path="/tmp/ca-certs/");
client::options options;
options.follow_redirects(true)
.cache_resolved(true)
.io_service(boost::make_shared<boost::asio::io_service>())
.openssl_certificate("/tmp/my-cert")
.openssl_verify_path("/tmp/ca-certs");
client client_(options);
// use client_ as normal from here on out.

HTTP Methods
Expand All @@ -207,7 +207,7 @@ and that there is an appropriately constructed response object named

``response_ = client_.get(request_)``
Perform an HTTP GET request.
``response_ = client_.get(request_, _body_handler=callback)``
``response_ = client_.get(request_, callback)``
Perform an HTTP GET request, and have the body chunks be handled by the
``callback`` parameter. The signature of ``callback`` should be the following:
``void(iterator_range<char const *> const &, boost::system::error_code const
Expand All @@ -217,7 +217,7 @@ and that there is an appropriately constructed response object named
``response_ = client_.post(request_)``
Perform an HTTP POST, use the data already set in the request object which
includes the headers, and the body.
``response_ = client_.post(request_, _body_handler=callback)``
``response_ = client_.post(request_, callback)``
Perform an HTTP POST request, and have the body chunks be handled by the
``callback`` parameter. The signature of ``callback`` should be the following:
``void(iterator_range<char const *> const &, boost::system::error_code const
Expand All @@ -226,18 +226,18 @@ and that there is an appropriately constructed response object named
Body is a string of type ``boost::network::string<Tag>::type`` where ``Tag``
is the HTTP Client's ``Tag``. The default content-type used is
``x-application/octet-stream``.
``response_ = client_.post(request_, body, _body_handler=callback)``
``response_ = client_.post(request_, body, callback)``
Body is a string of type ``boost::network::string<Tag>::type`` where ``Tag``
is the HTTP Client's ``Tag``. The default content-type used is
``x-application/octet-stream``. Have the response body chunks be handled by
the ``callback`` parameter. The signature of ``callback`` should be the
following: ``void(iterator_range<char const *> const &,
boost::system::error_code const &)``.
``response_ = client_.post(request_, content_type, body)``
``response_ = client_.post(request_, body, content_type)``
The body and content_type parameters are of type
``boost::network::string<Tag>::type`` where ``Tag`` is the HTTP Client's
``Tag``. This uses the request object's other headers.
``response_ = client_.post(request_, content_type, body, _body_handler=callback)``
``response_ = client_.post(request_, body, content_type, callback)``
The body and content_type parameters are of type
``boost::network::string<Tag>::type`` where ``Tag`` is the HTTP Client's
``Tag``. This uses the request object's other headers. Have the response
Expand All @@ -247,7 +247,7 @@ and that there is an appropriately constructed response object named
``response_ = client_.put(request_)``
Perform an HTTP PUT, use the data already set in the request object which
includes the headers, and the body.
``response_ = client_.put(request_, _body_handler=callback)``
``response_ = client_.put(request_, callback)``
Perform an HTTP PUT request, and have the body chunks be handled by the
``callback`` parameter. The signature of ``callback`` should be the following:
``void(iterator_range<char const *> const &, boost::system::error_code const
Expand All @@ -256,18 +256,18 @@ and that there is an appropriately constructed response object named
Body is a string of type ``boost::network::string<Tag>::type`` where ``Tag``
is the HTTP Client's ``Tag``. The default content-type used is
``x-application/octet-stream``.
``response_ = client_.put(request_, body, _body_handler=callback)``
``response_ = client_.put(request_, body, callback)``
Body is a string of type ``boost::network::string<Tag>::type`` where ``Tag``
is the HTTP Client's ``Tag``. The default content-type used is
``x-application/octet-stream``. Have the response body chunks be handled by
the ``callback`` parameter. The signature of ``callback`` should be the
following: ``void(iterator_range<char const *> const &,
boost::system::error_code const &)``.
``response_ = client_.put(request_, content_type, body)``
``response_ = client_.put(request_, body, content_type)``
The body and content_type parameters are of type
``boost::network::string<Tag>::type`` where ``Tag`` is the HTTP Client's
``Tag``. This uses the request object's other headers.
``response_ = client_.put(request_, content_type, body, _body_handler=callback)``
``response_ = client_.put(request_, body, content_type, body_handler=callback)``
The body and content_type parameters are of type
``boost::network::string<Tag>::type`` where ``Tag`` is the HTTP Client's
``Tag``. This uses the request object's other headers. Have the response
Expand All @@ -276,7 +276,7 @@ and that there is an appropriately constructed response object named
&, boost::system::error_code const &)``.
``response_ = client_.delete_(request_)``
Perform an HTTP DELETE request.
``response_ = client_.delete_(request_, _body_handler=callback)``
``response_ = client_.delete_(request_, body_handler=callback)``
Perform an HTTP DELETE request, and have the response body chunks be handled
by the ``callback`` parameter. The signature of ``callback`` should be the
following: ``void(iterator_range<char const *> const &,
Expand Down Expand Up @@ -320,7 +320,7 @@ An example of how to use the macro is shown below:
// somewhere else
std::string some_string;
response_ = client_.get(request("http://cpp-netlib.github.com/"),
_body_handler=body_handler(some_string));
body_handler(some_string));

You can also use if for standalone functions instead if you don't want or need
to create a function object.
Expand All @@ -337,7 +337,7 @@ to create a function object.

// somewhere else
response_ = client_.get(request("http://cpp-netlib.github.com/"),
_body_handler=print_body);
print_body);

The ``BOOST_NETWORK_HTTP_BODY_CALLBACK`` macro is defined in
``boost/network/protocol/http/client/macros.hpp``.
Loading