aboutsummaryrefslogtreecommitdiff
path: root/zenserver/monitoring/httpstats.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'zenserver/monitoring/httpstats.cpp')
-rw-r--r--zenserver/monitoring/httpstats.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/zenserver/monitoring/httpstats.cpp b/zenserver/monitoring/httpstats.cpp
new file mode 100644
index 000000000..a82cfda50
--- /dev/null
+++ b/zenserver/monitoring/httpstats.cpp
@@ -0,0 +1,33 @@
+// Copyright Epic Games, Inc. All Rights Reserved.
+
+#include "httpstats.h"
+
+namespace zen {
+
+HttpStatsService::HttpStatsService() : m_Log(logging::Get("stats"))
+{
+}
+
+HttpStatsService::~HttpStatsService()
+{
+}
+
+const char*
+HttpStatsService::BaseUri() const
+{
+ return "/stats/";
+}
+
+void
+HttpStatsService::HandleRequest(HttpServerRequest& Request)
+{
+ using namespace std::literals;
+
+ switch (Request.RequestVerb())
+ {
+ case HttpVerb::kGet:
+ return Request.WriteResponse(HttpResponseCode::OK, HttpContentType::kText, u8"OK!"sv);
+ }
+}
+
+} // namespace zen