These need to use a single newline for each line instead of the CRLF which is part of the serialized data. And of course do not print the trailing CRLF which indicates the end of the headers. The exact list of types which need std::ostream support are: request, response, request_base, response_base, fields, fields_base