Support response data streaming and add an example file downloader.

This commit is contained in:
Chunting Gu
2019-08-08 17:12:22 +08:00
parent 3077f21549
commit 0292b4b51e
19 changed files with 370 additions and 148 deletions
+3
View File
@@ -24,6 +24,9 @@ std::string GetTimestamp();
bool SplitKV(const std::string& str, char delimiter,
std::string* key, std::string* value);
// Convert string to size_t.
bool ToSize(const std::string& str, int base, std::size_t* size);
// Tell the size in bytes of the given file.
// Return kInvalidLength (-1) on failure.
std::size_t TellSize(const Path& path);