In some cases, such as the handling of the [@https://tools.ietf.org/html/rfc7231#section-5.1.1 Expect: 100-continue] field, it may be desired to first serialize the header, perform some other action, and then continue with serialization of the body. This is accomplished by calling [link beast.ref.boost__beast__http__serializer.split `serializer::split`] with a boolean indicating that when buffers are produced, the last buffer containing serialized header octets will not contain any octets corresponding to the body. The function [link beast.ref.boost__beast__http__serializer.is_header_done `serializer::is_header_done`] informs the caller whether the header been serialized fully. In this C++14 example we print the header first, followed by the body:
In some cases, such as the handling of the [@https://tools.ietf.org/html/rfc7231#section-5.1.1 Expect: 100-continue] field, it may be desired to first serialize the header, perform some other action, and then continue with serialization of the body. This is accomplished by calling [link beast.ref.boost__beast__http__serializer.split `serializer::split`] with a boolean indicating that when buffers are produced, the last buffer containing serialized header octets will not contain any octets corresponding to the body. The function [link beast.ref.boost__beast__http__serializer.is_header_done `serializer::is_header_done`] informs the caller whether the header been serialized fully. In this C++14 example we print the header first, followed by the body: