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 -4
View File
@@ -38,12 +38,11 @@ void SplitStartLine(const std::string& line, std::vector<std::string>* parts) {
// -----------------------------------------------------------------------------
ResponseParser::ResponseParser(Response* response)
: Parser(response), response_(response) {
ResponseParser::ResponseParser() : response_(nullptr) {
}
void ResponseParser::Init(Response* response) {
Parser::Init(response);
void ResponseParser::Init(Response* response, bool stream) {
Parser::Init(response, stream);
response_ = response;
}