summaryrefslogtreecommitdiffstats
path: root/BrowserSource/Proxy/HTTPMapper.h
diff options
context:
space:
mode:
Diffstat (limited to 'BrowserSource/Proxy/HTTPMapper.h')
-rw-r--r--BrowserSource/Proxy/HTTPMapper.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/BrowserSource/Proxy/HTTPMapper.h b/BrowserSource/Proxy/HTTPMapper.h
new file mode 100644
index 0000000..e349f6e
--- /dev/null
+++ b/BrowserSource/Proxy/HTTPMapper.h
@@ -0,0 +1,35 @@
+#pragma once
+
+#include "WebCommon.h"
+
+#include <string>
+
+namespace WebServer {
+
+ class HTTPMapper {
+ public:
+ HTTPMapper() {}
+ virtual ~HTTPMapper() {}
+
+ std::string Map(int status_code,
+ const std::string& payload, ContentType type);
+ };
+
+ class HTTPMapperHTML : public HTTPMapper {
+ public:
+ HTTPMapperHTML() {}
+ virtual ~HTTPMapperHTML() {}
+
+ std::string Map(int status_code,
+ const std::string& payload);
+ };
+
+ class HTTPMapperJSON : public HTTPMapper {
+ public:
+ HTTPMapperJSON() {}
+ virtual ~HTTPMapperJSON() {}
+
+ std::string Map(int status_code,
+ const std::string& payload);
+ };
+}