summaryrefslogtreecommitdiff
path: root/http/http_response.hpp
diff options
context:
space:
mode:
authorJohn Edward Broadbent <jebr@google.com>2021-07-20 02:52:24 +0300
committerEd Tanous <ed@tanous.net>2021-08-23 22:31:36 +0300
commit4147b8ac88c79949f2f9f5c2738aca53641e22c8 (patch)
tree554defc6d03e00a6131186cb366f33c6a6a6ca2a /http/http_response.hpp
parent8338891aa2c5424c52fe3e0bea320172a5aedda3 (diff)
downloadbmcweb-4147b8ac88c79949f2f9f5c2738aca53641e22c8.tar.xz
connection use setter for completeRequestHandler
The Connection object used to set the response object public member. However, it is cleaner when public interfaces are used. Change-Id: Ib16950f174106e5fd22aad874f09f31704283ad1 Signed-off-by: John Edward Broadbent <jebr@google.com> Signed-off-by: Ed Tanous <edtanous@google.com>
Diffstat (limited to 'http/http_response.hpp')
-rw-r--r--http/http_response.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/http/http_response.hpp b/http/http_response.hpp
index 72ff9e9c05..a983d4ae51 100644
--- a/http/http_response.hpp
+++ b/http/http_response.hpp
@@ -136,6 +136,11 @@ struct Response
return isAliveHelper && isAliveHelper();
}
+ void setCompleteRequestHandler(std::function<void()> newHandler)
+ {
+ completeRequestHandler = std::move(newHandler);
+ }
+
private:
bool completed{};
std::function<void()> completeRequestHandler;