Move data decompression to StringBody.

This commit is contained in:
Chunting Gu
2019-08-07 15:59:22 +08:00
parent effe302faa
commit 3077f21549
7 changed files with 55 additions and 33 deletions
+2 -2
View File
@@ -87,12 +87,12 @@ public:
}
ResponseBuilder& Body(const std::string& data) {
body_.reset(new StringBody{ data });
body_.reset(new StringBody{ data, false });
return *this;
}
ResponseBuilder& Body(std::string&& data) {
body_.reset(new StringBody{ std::move(data) });
body_.reset(new StringBody{ std::move(data), false });
return *this;
}