Added convenience function Client::Response::Content::string()

This commit is contained in:
eidheim 2017-06-22 22:00:07 +02:00
commit 6b7fd993cf
5 changed files with 29 additions and 4 deletions

View file

@ -126,6 +126,7 @@ namespace SimpleWeb {
size_t size() {
return streambuf.size();
}
/// Convenience function to return std::string. Note that the stream buffer is emptied when this functions is used.
std::string string() {
std::stringstream ss;
ss << rdbuf();