Add HTTPMessage::toString and family

This commit is contained in:
Vinnie Falco
2013-09-11 18:24:40 -07:00
parent ee728e3dbc
commit 057344e1af
6 changed files with 38 additions and 0 deletions

View File

@@ -72,3 +72,15 @@ String HTTPHeaders::operator[] (String const& field) const
{
return get (field);
}
String HTTPHeaders::toString () const
{
String s;
for (int i = 0; i < m_fields.size (); ++i)
{
HTTPField const field (at(i));
s << field.name() << ": " << field.value() << newLine;
}
return s;
}