Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc56a463

Browse files
committed
Merge pull requestcpp-netlib#441 from povilasb/0.11-devel-docfix-http-response-status
0.11 devel docfix http response status
2 parents41f8d87 +a9bc4e5 commitc56a463

File tree

48 files changed

+10662
-528
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+10662
-528
lines changed

‎libs/network/doc/examples/http/http_client.rst

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,18 @@ Without further ado, the code to do this is as follows:
2323
int main(int argc, char *argv[]) {
2424
using namespace boost::network;
2525
26-
if (argc != 2) {
27-
std::cout << "Usage: " << argv[0] << " [url]" << std::endl;
28-
return 1;
26+
if (argc != 2) {
27+
std::cout << "Usage: " << argv[0] << " [url]" << std::endl;
28+
return 1;
2929
}
3030

3131
http::client client;
3232
http::client::request request(argv[1]);
33-
request << header("Connection", "close");
34-
http::client::response response = client.get(request);
35-
std::cout << body(response) << std::endl;
33+
request << header("Connection", "close");
34+
http::client::response response = client.get(request);
35+
std::cout << body(response) << std::endl;
3636

37-
return 0;
37+
return 0;
3838
}
3939

4040
Running the example
@@ -50,11 +50,13 @@ You can then run this to get the Boost_ website:
5050
5151
.. _Boost:http://www.boost.org/
5252

53-
..note::The instructions for all these examples assume that
54-
:mod:`cpp-netlib` is build outside the source tree,
55-
according to `CMake conventions`_. For the sake of
56-
consistency we assume that this is in the
57-
``~/cpp-netlib-build`` directory.
53+
..note::
54+
55+
The instructions for all these examples assume that
56+
:mod:`cpp-netlib` is build outside the source tree,
57+
according to `CMake conventions`_. For the sake of
58+
consistency we assume that this is in the
59+
``~/cpp-netlib-build`` directory.
5860

5961
.. _`CMake conventions`:http://www.cmake.org/Wiki/CMake_FAQ#What_is_an_.22out-of-source.22_build.3F
6062

‎libs/network/doc/getting_started.rst

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,12 @@ additional parameters::
126126
> -DCMAKE_CXX_COMPILER=g++ \
127127
> ../cpp-netlib
128128

129-
..note::While it's not compulsory, it's recommended that
130-
:mod:`cpp-netlib` is built outside the source directory.
131-
For the purposes of documentation, we'll assume that all
132-
builds are done in ``~/cpp-netlib-build``.
129+
..note::
130+
131+
While it's not compulsory, it's recommended that
132+
:mod:`cpp-netlib` is built outside the source directory.
133+
For the purposes of documentation, we'll assume that all
134+
builds are done in ``~/cpp-netlib-build``.
133135

134136
If you intend to use the SSL support when using the HTTP client libraries in
135137
:mod:`cpp-netlib`, you may need to build it withOpenSSL_ installed or at least
@@ -230,7 +232,7 @@ CMake projects
230232

231233
Projects using CMake can add the following lines in their ``CMakeLists.txt`` to
232234
be able to use:mod:`cpp-netlib`::
233-
235+
234236
set ( CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ~/cpp-netlib-build )
235237
find_package ( cppnetlib 0.11.0 REQUIRED )
236238
include_directories ( ${CPPNETLIB_INCLUDE_DIRS} )
@@ -240,7 +242,7 @@ be able to use :mod:`cpp-netlib`::
240242
is not installed to a location that CMake searches. When:mod:`cpp-netlib`
241243
is installed to the default location (``/usr/local``), ``CMake`` can find it.
242244

243-
..note::We assume that ``MyApplication`` is the application that you are
245+
..note::We assume that ``MyApplication`` is the application that you are
244246
building and which depends on:mod:`cpp-netlib`.
245247

246248

‎libs/network/doc/html/.buildinfo

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config:247e8c3d216dc851efe8ee3a759ed678
4-
tags:645f666f9bcd5a90fca523b33c5a78b7
3+
config:ae0de19b7b7891744d7373f4a9b6c125
4+
tags:fbb0d17656682115ca4d033fb2f83ba1

‎libs/network/doc/html/_sources/examples/http/http_client.txt

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,18 @@ Without further ado, the code to do this is as follows:
2323
int main(int argc, char *argv[]) {
2424
using namespace boost::network;
2525

26-
if (argc != 2) {
27-
std::cout << "Usage: " << argv[0] << " [url]" << std::endl;
28-
return 1;
26+
if (argc != 2) {
27+
std::cout << "Usage: " << argv[0] << " [url]" << std::endl;
28+
return 1;
2929
}
3030

3131
http::client client;
3232
http::client::request request(argv[1]);
33-
request << header("Connection", "close");
34-
http::client::response response = client.get(request);
35-
std::cout << body(response) << std::endl;
33+
request << header("Connection", "close");
34+
http::client::response response = client.get(request);
35+
std::cout << body(response) << std::endl;
3636

37-
return 0;
37+
return 0;
3838
}
3939

4040
Running the example
@@ -50,11 +50,13 @@ You can then run this to get the Boost_ website:
5050

5151
.. _Boost: http://www.boost.org/
5252

53-
.. note:: The instructions for all these examples assume that
54-
:mod:`cpp-netlib` is build outside the source tree,
55-
according to `CMake conventions`_. For the sake of
56-
consistency we assume that this is in the
57-
``~/cpp-netlib-build`` directory.
53+
.. note::
54+
55+
The instructions for all these examples assume that
56+
:mod:`cpp-netlib` is build outside the source tree,
57+
according to `CMake conventions`_. For the sake of
58+
consistency we assume that this is in the
59+
``~/cpp-netlib-build`` directory.
5860

5961
.. _`CMake conventions`: http://www.cmake.org/Wiki/CMake_FAQ#What_is_an_.22out-of-source.22_build.3F
6062

‎libs/network/doc/html/_sources/getting_started.txt

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,12 @@ additional parameters::
126126
> -DCMAKE_CXX_COMPILER=g++ \
127127
> ../cpp-netlib
128128

129-
.. note:: While it's not compulsory, it's recommended that
130-
:mod:`cpp-netlib` is built outside the source directory.
131-
For the purposes of documentation, we'll assume that all
132-
builds are done in ``~/cpp-netlib-build``.
129+
.. note::
130+
131+
While it's not compulsory, it's recommended that
132+
:mod:`cpp-netlib` is built outside the source directory.
133+
For the purposes of documentation, we'll assume that all
134+
builds are done in ``~/cpp-netlib-build``.
133135

134136
If you intend to use the SSL support when using the HTTP client libraries in
135137
:mod:`cpp-netlib`, you may need to build it with OpenSSL_ installed or at least
@@ -230,7 +232,7 @@ CMake projects
230232

231233
Projects using CMake can add the following lines in their ``CMakeLists.txt`` to
232234
be able to use :mod:`cpp-netlib`::
233-
235+
234236
set ( CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ~/cpp-netlib-build )
235237
find_package ( cppnetlib 0.11.0 REQUIRED )
236238
include_directories ( ${CPPNETLIB_INCLUDE_DIRS} )
@@ -240,7 +242,7 @@ be able to use :mod:`cpp-netlib`::
240242
is not installed to a location that CMake searches. When :mod:`cpp-netlib`
241243
is installed to the default location (``/usr/local``), ``CMake`` can find it.
242244

243-
.. note:: We assume that ``MyApplication`` is the application that you are
245+
.. note:: We assume that ``MyApplication`` is the application that you are
244246
building and which depends on :mod:`cpp-netlib`.
245247

246248

‎libs/network/doc/html/_sources/reference/http_request.txt

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Concept`_, otherwise it chooses the `Normal Client Request Concept`_.
3131
Normal Client Request Concept
3232
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3333

34-
A type models the Normal Client Request Concept if it models the `Message
34+
A type models the Normal Client Request Concept if it models the `Message
3535
Concept`_ and also supports the following constructs.
3636

3737
**Legend**
@@ -123,8 +123,8 @@ and also supports the following constructs.
123123
Directives
124124
----------
125125

126-
This section details the provided directives that are provided by
127-
:mod:`cpp-netlib`. The section was written to assume that an appropriately
126+
This section details the provided directives that are provided by
127+
:mod:`cpp-netlib`. The section was written to assume that an appropriately
128128
constructed request instance is either of the following:
129129

130130
.. code-block:: c++
@@ -152,24 +152,26 @@ Directives are meant to be used in the following manner:
152152

153153
request << directive(...);
154154

155-
.. warning:: There are two versions of directives, those that are applicable to
156-
messages that support narrow strings (``std::string``) and those that are
157-
applicable to messages that support wide strings (``std::wstring``). The
158-
:mod:`cpp-netlib` implementation still does not convert wide strings into
159-
UTF-8 encoded narrow strings. This will be implemented in subsequent
160-
library releases.
155+
.. warning::
161156

162-
For now all the implemented directives are listed, even if some of them still
163-
do not implement things correctly.
157+
There are two versions of directives, those that are applicable to
158+
messages that support narrow strings (``std::string``) and those that are
159+
applicable to messages that support wide strings (``std::wstring``). The
160+
:mod:`cpp-netlib` implementation still does not convert wide strings into
161+
UTF-8 encoded narrow strings. This will be implemented in subsequent
162+
library releases.
163+
164+
For now all the implemented directives are listed, even if some of them still
165+
do not implement things correctly.
164166

165167
*unspecified* ``source(std::string const & source_)``
166-
Create a source directive with a ``std::string`` as a parameter, to be set
168+
Create a source directive with a ``std::string`` as a parameter, to be set
167169
as the source of the request.
168170
*unspecified* ``source(std::wstring const & source_)``
169171
Create a source directive with a ``std::wstring`` as a parameter, to be set
170172
as the source of the request.
171173
*unspecified* ``destination(std::string const & source_)``
172-
Create a destination directive with a ``std::string`` as a parameter, to be
174+
Create a destination directive with a ``std::string`` as a parameter, to be
173175
set as the destination of the request.
174176
*unspecified* ``destination(std::wstring const & source_)``
175177
Create a destination directive with a ``std::wstring`` as a parameter, to be
@@ -200,7 +202,7 @@ Directives are meant to be used in the following manner:
200202
Modifiers
201203
---------
202204

203-
This section details the provided modifiers that are provided by
205+
This section details the provided modifiers that are provided by
204206
:mod:`cpp-netlib`.
205207

206208
``template <class Tag> inline void source(basic_request<Tag> & request, typename string<Tag>::type const & source_)``
@@ -232,7 +234,7 @@ section assumes that the following using namespace directives are in
232234
effect:
233235

234236
.. code-block:: c++
235-
237+
236238
using namespace boost::network;
237239
using namespace boost::network::http;
238240

‎libs/network/doc/html/_sources/reference/http_response.txt

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ with the HTTP Response objects.
1515
Response Concept
1616
----------------
1717

18-
A type models the Response Concept if it models the `Message Concept`_ and also
18+
A type models the Response Concept if it models the `Message Concept`_ and also
1919
supports the following constructs.
2020

2121
**Legend**
@@ -80,8 +80,8 @@ supports the following constructs.
8080
Directives
8181
----------
8282

83-
This section details the provided directives that are provided by
84-
:mod:`cpp-netlib`. The section was written to assume that an appropriately
83+
This section details the provided directives that are provided by
84+
:mod:`cpp-netlib`. The section was written to assume that an appropriately
8585
constructed response instance is either of the following:
8686

8787
.. code-block:: c++
@@ -109,13 +109,13 @@ Directives are meant to be used in the following manner:
109109

110110
response << directive(...);
111111

112-
.. warning:: There are four versions of directives, those that are applicable
112+
.. warning:: There are four versions of directives, those that are applicable
113113
to messages that support narrow strings (``std::string``), those that are
114114
applicable to messages that support wide strings (``std::wstring``), those
115115
that are applicable to messages that support future-wrapped narrow and wide
116116
strings (``boost::shared_future<std::string>`` and
117-
``boost::shared_future<std::wstring>``).
118-
117+
``boost::shared_future<std::wstring>``).
118+
119119
The :mod:`cpp-netlib` implementation still does not convert wide strings into
120120
UTF-8 encoded narrow strings. This will be implemented in subsequent
121121
library releases.
@@ -124,25 +124,25 @@ Directives are meant to be used in the following manner:
124124
do not implement things correctly.
125125

126126
*unspecified* ``source(std::string const & source_)``
127-
Create a source directive with a ``std::string`` as a parameter, to be set
127+
Create a source directive with a ``std::string`` as a parameter, to be set
128128
as the source of the response.
129129
*unspecified* ``source(std::wstring const & source_)``
130130
Create a source directive with a ``std::wstring`` as a parameter, to be set
131131
as the source of the response.
132132
*unspecified* ``source(boost::shared_future<std::string> const & source_)``
133-
Create a source directive with a ``boost::shared_future<std::string>`` as a parameter, to be set
133+
Create a source directive with a ``boost::shared_future<std::string>`` as a parameter, to be set
134134
as the source of the response.
135135
*unspecified* ``source(boost::shared_future<std::wstring> const & source_)``
136136
Create a source directive with a ``boost::shared_future<std::wstring>`` as a parameter, to be set
137137
as the source of the response.
138138
*unspecified* ``destination(std::string const & source_)``
139-
Create a destination directive with a ``std::string`` as a parameter, to be
139+
Create a destination directive with a ``std::string`` as a parameter, to be
140140
set as the destination of the response.
141141
*unspecified* ``destination(std::wstring const & source_)``
142142
Create a destination directive with a ``std::wstring`` as a parameter, to be
143143
set as the destination of the response.
144144
*unspecified* ``destination(boost::shared_future<std::string> const & destination_)``
145-
Create a destination directive with a ``boost::shared_future<std::string>`` as a parameter, to be set
145+
Create a destination directive with a ``boost::shared_future<std::string>`` as a parameter, to be set
146146
as the destination of the response.
147147
*unspecified* ``destination(boost::shared_future<std::wstring> const & destination_)``
148148
Create a destination directive with a ``boost::shared_future<std::wstring>`` as a parameter, to be set
@@ -225,7 +225,7 @@ Directives are meant to be used in the following manner:
225225
Modifiers
226226
---------
227227

228-
This section details the provided modifiers that are provided by
228+
This section details the provided modifiers that are provided by
229229
:mod:`cpp-netlib`.
230230

231231
``template <class Tag> inline void source(basic_response<Tag> & response, typename string<Tag>::type const & source_)``
@@ -248,10 +248,10 @@ This section details the provided modifiers that are provided by
248248
Removes a header from the given ``response``. The type of the ``name``
249249
parameter is dependent on the ``Tag`` specialization of ``basic_response``.
250250
``template <class Tag> inline void headers(basic_response<Tag> & response, typename headers_container<basic_response<Tag> >::type const & headers_)``
251-
Sets the whole headers contained in ``response`` as the given parameter
251+
Sets the whole headers contained in ``response`` as the given parameter
252252
``headers_``.
253253
``template <class Tag> inline void headers(basic_response<Tag> & response, boost::shared_future<typename headers_container<basic_response<Tag> >::type> const & headers_)``
254-
Sets the whole headers contained in ``response`` as the given parameter
254+
Sets the whole headers contained in ``response`` as the given parameter
255255
``headers_``.
256256
``template <class Tag> inline void clear_headers(basic_response<Tag> & response)``
257257
Removes all headers from the given ``response``.
@@ -281,7 +281,7 @@ section assumes that the following using namespace directives are in
281281
effect:
282282

283283
.. code-block:: c++
284-
284+
285285
using namespace boost::network;
286286
using namespace boost::network::http;
287287

@@ -302,7 +302,7 @@ effect:
302302
Returns a wrapper convertible to ``typename string<Tag>::type`` that
303303
provides the version of the given response.
304304
``template <class Tag>`` *unspecified* ``status(basic_response<Tag> const & response)``
305-
Returns a wrapper convertible to ``typenamestring<Tag>::type`` that
305+
Returns a wrapper convertible to ``typenameboost::uint16_t`` that
306306
provides the status of the given response.
307307
``template <class Tag>`` *unspecified* ``status_message(basic_response<Tag> const & response)``
308308
Returns a wrapper convertible to ``typename string<Tag>::type`` that

‎libs/network/doc/html/_static/basic.css

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Sphinx stylesheet -- basic theme.
66
*
7-
* :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
7+
* :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
88
* :license: BSD, see LICENSE for details.
99
*
1010
*/
@@ -89,7 +89,6 @@ div.sphinxsidebar #searchbox input[type="submit"] {
8989

9090
img {
9191
border:0;
92-
max-width:100%;
9392
}
9493

9594
/* -- search page ----------------------------------------------------------- */
@@ -402,6 +401,10 @@ dl.glossary dt {
402401
margin:0;
403402
}
404403

404+
.refcount {
405+
color:#060;
406+
}
407+
405408
.optional {
406409
font-size:1.3em;
407410
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp