Refine the streaming, add UT, add error handling.

This commit is contained in:
Chunting Gu
2019-08-09 16:10:16 +08:00
parent c669551552
commit feae9b7acc
17 changed files with 316 additions and 212 deletions
+2 -2
View File
@@ -27,11 +27,11 @@ public:
}
// Get the data from the (string) body.
// Empty string will be returned if the body is not a StringBody.
// Return empty string if the body is not a StringBody.
const std::string& data() const;
// Get the body as a FileBody.
// Exception Error::kDataError will be thrown if the body is not a FileBody.
// Return null if the body is not a FileBody.
std::shared_ptr<FileBody> file_body() const;
// ---------------------------------------------------------------------------