@@ -71,7 +71,7 @@ behave as a fully synchronous client.
71
71
72
72
The synchronous client implements all the operations of the client underneath
73
73
the interface all block to wait for I/O to finish. All the member methods are
74
- synchronous and will block until the response object is ready or throws if erros
74
+ synchronous and will block until the response object is ready or throws if errors
75
75
are encountered in the performance of the HTTP requests.
76
76
77
77
.. warning:: The synchronous clients are **NOT** thread safe. You will need to do
@@ -137,7 +137,7 @@ In this section we assume that the following typedef is in effect:
137
137
typedef boost::network::http::basic_client<
138
138
boost::network::http::tags::http_default_8bit_udp_resolve
139
139
, 1
140
- ,1
140
+ , 1
141
141
>
142
142
client;
143
143
@@ -290,6 +290,17 @@ and that there is an appropriately constructed response object named
290
290
body chunks be handled by the ``callback`` parameter. The signature of
291
291
``callback`` should be the following: ``void(iterator_range<char const *> const
292
292
&, boost::system::error_code const &)``.
293
+ ``response_ = client_.post(request_, body, content_type, callback, streaming_callback)``
294
+ The body and content_type parameters are of type
295
+ ``boost::network::string<Tag>::type`` where ``Tag`` is the HTTP Client's
296
+ ``Tag``. This uses the request object's other headers. Have the response
297
+ body chunks be handled by the ``callback`` parameter. The signature of
298
+ ``callback`` should be the following: ``void(iterator_range<char const *> const
299
+ &, boost::system::error_code const &)``. The ``streaming_callback``
300
+ argument should have a which has a signature of the form:
301
+ ``bool(string_type&)``. The provided ``string_type&`` will be streamed as
302
+ soon as the function returns. A return value of ``false`` signals the
303
+ client that the most recent invocation is the last chunk to be sent.
293
304
``response_ = client_.post(request_, streaming_callback)``
294
305
Perform and HTTP POST request, and have the request's body chunks be
295
306
generated by the ``streaming_callback`` which has a signature of the form:
@@ -329,13 +340,25 @@ and that there is an appropriately constructed response object named
329
340
The body and content_type parameters are of type
330
341
``boost::network::string<Tag>::type`` where ``Tag`` is the HTTP Client's
331
342
``Tag``. This uses the request object's other headers.
332
- ``response_ = client_.put(request_, body, content_type, body_handler= callback)``
343
+ ``response_ = client_.put(request_, body, content_type, callback)``
333
344
The body and content_type parameters are of type
334
345
``boost::network::string<Tag>::type`` where ``Tag`` is the HTTP Client's
335
346
``Tag``. This uses the request object's other headers. Have the response
336
347
body chunks be handled by the ``callback`` parameter. The signature of
337
348
``callback`` should be the following: ``void(iterator_range<char const *> const
338
349
&, boost::system::error_code const &)``.
350
+ ``response_ = client_.put(request_, body, content_type, callback, streaming_callback)``
351
+ The body and content_type parameters are of type
352
+ ``boost::network::string<Tag>::type`` where ``Tag`` is the HTTP Client's
353
+ ``Tag``. This uses the request object's other headers. Have the response
354
+ body chunks be handled by the ``callback`` parameter. The signature of
355
+ ``callback`` should be the following: ``void(iterator_range<char const *> const
356
+ &, boost::system::error_code const &)``. This form also has the request's body
357
+ chunks be generated by the ``streaming_callback`` which has a signature of
358
+ the form: ``bool(string_type&)``. The provided ``string_type&`` will be
359
+ streamed as soon as the function returns. A return value of ``false``
360
+ signals the client that the most recent invocation is the last chunk to be
361
+ sent
339
362
``response_ = client_.put(request_, streaming_callback)``
340
363
Perform and HTTP PUT request, and have the request's body chunks be
341
364
generated by the ``streaming_callback`` which has a signature of the form:
0 commit comments