Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext
http::operator<< (5 of 5 overloads)

Serialize an HTTP/1 message to a std::ostream.

Synopsis

Defined in header <boost/beast/http/write.hpp>

template<
    bool isRequest,
    class Body,
    class Fields>
std::ostream&
operator<<(
    std::ostream& os,
    message< isRequest, Body, Fields > const& msg);
Description

The function converts the message to its HTTP/1 serialized representation and stores the result in the output stream.

The implementation will automatically perform chunk encoding if the contents of the message indicate that chunk encoding is required.

Parameters

Name

Description

os

The output stream to write to.

msg

The message to write.

Convenience header <boost/beast/http.hpp>


PrevUpHomeNext