Large updates to webserver

Do not merge yet

Change-Id: I38c56844c1b0e3e8e5493c2705e62e6db7ee2102
diff --git a/include/intel_oem.hpp b/include/intel_oem.hpp
new file mode 100644
index 0000000..e821807
--- /dev/null
+++ b/include/intel_oem.hpp
@@ -0,0 +1,33 @@
+#pragma once
+
+#include <dbus_singleton.hpp>
+#include <fstream>
+#include <crow/app.h>
+
+namespace crow {
+namespace intel_oem {
+
+template <typename... Middlewares>
+void request_routes(Crow<Middlewares...>& app) {
+  CROW_ROUTE(app, "/intel/firmwareupload")
+      .methods("POST"_method)([](const crow::request& req) {
+        std::string filepath("/tmp/fw_update_image");
+        std::ofstream out(filepath, std::ofstream::out | std::ofstream::binary |
+                                        std::ofstream::trunc);
+        out << req.body;
+        out.close();
+
+        auto m = dbus::message::new_call(
+            {"xyz.openbmc_project.fwupdate1.server",
+             "/xyz/openbmc_project/fwupdate1", "xyz.openbmc_project.fwupdate1"},
+            "start");
+
+        m.pack(std::string("file://") + filepath);
+        crow::connections::system_bus->send(m);
+        nlohmann::json j;
+        j["status"] = "Upload Successful";
+        return j;
+      });
+}
+}  // namespace redfish
+}  // namespace crow