aboutsummaryrefslogtreecommitdiffstats
path: root/libtransport/src/hicn/transport/http/response.h
diff options
context:
space:
mode:
authorMauro Sardara <msardara@cisco.com>2020-02-18 16:21:07 +0100
committerMauro Sardara <msardara@cisco.com>2020-02-18 17:06:12 +0100
commit46c924b9d2edd84bc6ecb5367ba52fcff82804fa (patch)
tree0e1aa2f6c14480bb0b06109cf6c1385a20cdadb5 /libtransport/src/hicn/transport/http/response.h
parent4590ae6202d7f3fbf932a57e4d9500ce5ac1e473 (diff)
[HICN-528] Add progress bar to higet.
Change-Id: I645ef2b8834f4310933793fb1f59e8f37e3d6aef Signed-off-by: Mauro Sardara <msardara@cisco.com>
Diffstat (limited to 'libtransport/src/hicn/transport/http/response.h')
-rw-r--r--libtransport/src/hicn/transport/http/response.h17
1 files changed, 6 insertions, 11 deletions
diff --git a/libtransport/src/hicn/transport/http/response.h b/libtransport/src/hicn/transport/http/response.h
index b261a128a..7ef655059 100644
--- a/libtransport/src/hicn/transport/http/response.h
+++ b/libtransport/src/hicn/transport/http/response.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2019 Cisco and/or its affiliates.
+ * Copyright (c) 2017-2020 Cisco and/or its affiliates.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
@@ -26,26 +26,21 @@ namespace transport {
namespace http {
-class HTTPResponse : public HTTPMessage, public std::vector<uint8_t> {
+class HTTPResponse : public HTTPMessage {
public:
- HTTPResponse(const HTTPHeaders &headers, const HTTPPayload &payload);
-
HTTPResponse();
- const HTTPHeaders &getHeaders() override;
+ HTTPResponse(std::unique_ptr<utils::MemBuf> &&response);
- const HTTPPayload &getPayload() override;
+ void appendResponseChunk(std::unique_ptr<utils::MemBuf> &&response_chunk);
const std::string &getStatusCode() const;
const std::string &getStatusString() const;
- const std::string &getHttpVersion() const override;
-
- void parse();
+ void parse(std::unique_ptr<utils::MemBuf> &&response);
- private:
- bool parseHeaders();
+ bool parseHeaders(std::unique_ptr<utils::MemBuf> &&buffer);
private:
std::string status_code_;