From d3afd7fad68737f764ef491ce1d9b12723fef7f9 Mon Sep 17 00:00:00 2001 From: Mohammad Nejati Date: Fri, 5 Jan 2024 14:44:31 +0000 Subject: [PATCH] Improve documentation for `http::message::prepare_payload()` Fixes #603 --- include/boost/beast/http/message.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/boost/beast/http/message.hpp b/include/boost/beast/http/message.hpp index c21e3685..3a73efca 100644 --- a/include/boost/beast/http/message.hpp +++ b/include/boost/beast/http/message.hpp @@ -852,6 +852,14 @@ public: req.body() = "Hello, world!"; req.prepare_payload(); @endcode + + @note This function is not necessary to call in + the following situations: + + @li The request doesn't contain a body, such as + in a GET or HEAD request. + + @li The Content-Length and Transfer-Encoding are set manually. */ void prepare_payload()