aboutsummaryrefslogtreecommitdiff
path: root/src/RequestResponse.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/RequestResponse.hpp')
-rw-r--r--src/RequestResponse.hpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/RequestResponse.hpp b/src/RequestResponse.hpp
new file mode 100644
index 0000000..8a7e1d3
--- /dev/null
+++ b/src/RequestResponse.hpp
@@ -0,0 +1,29 @@
+#ifndef REQUEST_RESPONSE_H
+#define REQUEST_RESPONSE_H 1
+
+#include <event2/http.h>
+
+#include <string>
+
+class RequestResponse
+{
+public:
+ RequestResponse(struct evhttp_request * const req);
+ ~RequestResponse();
+
+ void UseInputHeader();
+ void UseOutputHeader();
+
+ bool AddOutputHeaderByRef(std::string & key, std::string & value);
+ bool AddOutputHeader(std::string key, std::string value);
+
+ bool GetInputHeaderByRef(std::string & key, std::string & value);
+ bool GetInputHeader(std::string key, std::string value);
+
+private:
+ struct evhttp_request * const m_Request;
+ struct evkeyvalq * m_InputHeader;
+ struct evkeyvalq * m_OutputHeader;
+};
+
+#endif