diff --git a/doc/quickref.xml b/doc/quickref.xml index 8f5cc650..1949e3d1 100644 --- a/doc/quickref.xml +++ b/doc/quickref.xml @@ -43,8 +43,8 @@ empty_decorator request response + serializer string_body - write_stream rfc7230 @@ -63,7 +63,7 @@ async_write is_keep_alive is_upgrade - make_write_stream + make_serializer operator<< prepare read diff --git a/include/beast/http/impl/write.ipp b/include/beast/http/impl/write.ipp index c0ec5131..7b76bbf4 100644 --- a/include/beast/http/impl/write.ipp +++ b/include/beast/http/impl/write.ipp @@ -1001,7 +1001,7 @@ write(SyncWriteStream& stream, "Body requirements not met"); static_assert(is_body_reader::value, "BodyReader requirements not met"); - auto ws = make_write_stream(msg); + auto ws = make_serializer(msg); for(;;) { ws.write_some(stream, ec); diff --git a/include/beast/http/write.hpp b/include/beast/http/write.hpp index 4d434040..9e58290c 100644 --- a/include/beast/http/write.hpp +++ b/include/beast/http/write.hpp @@ -78,7 +78,7 @@ struct empty_decorator To use this class, construct an instance with the message to be sent. To make it easier to declare the type, the - helper function @ref make_write_stream is provided: + helper function @ref make_serializer is provided: The implementation will automatically perform chunk encoding if the contents of the message indicate that chunk encoding @@ -156,7 +156,7 @@ struct empty_decorator @tparam Allocator The type of allocator to use. - @see @ref make_write_stream + @see @ref make_serializer */ template< bool isRequest, class Body, class Fields, @@ -420,7 +420,7 @@ inline serializer::type, typename std::decay::type> -make_write_stream(message const& m, +make_serializer(message const& m, Decorator const& decorator = Decorator{}, Allocator const& allocator = Allocator{}) { diff --git a/test/http/design.cpp b/test/http/design.cpp index abc1dbaf..7c07fcff 100644 --- a/test/http/design.cpp +++ b/test/http/design.cpp @@ -77,7 +77,7 @@ public: req.body = "Hello, world!"; // send header - auto ws = make_write_stream(req); + auto ws = make_serializer(req); for(;;) { ws.async_write_some(stream, yield); @@ -162,7 +162,7 @@ public: m.target("/"); m.fields.insert("User-Agent", "test"); m.fields.insert("Content-Length", s.size()); - auto ws = make_write_stream(m); + auto ws = make_serializer(m); error_code ec; for(;;) { diff --git a/test/http/write.cpp b/test/http/write.cpp index c05d1e2d..b0ca6fac 100644 --- a/test/http/write.cpp +++ b/test/http/write.cpp @@ -765,7 +765,7 @@ public: isRequest, Body, Fields> const& m, error_code& ec, Decorator const& decorator = Decorator{}) { - auto ws = make_write_stream(m, decorator); + auto ws = make_serializer(m, decorator); for(;;) { stream.nwrite = 0; @@ -787,7 +787,7 @@ public: error_code& ec, yield_context yield, Decorator const& decorator = Decorator{}) { - auto ws = make_write_stream(m); + auto ws = make_serializer(m); for(;;) { stream.nwrite = 0; @@ -969,7 +969,7 @@ public: m.body.first = boost::none; m.body.second = true; - auto w = make_write_stream(m); + auto w = make_serializer(m); // send the header first, so the // other end gets it right away