diff Core/Lua/LuaFunctionCall.cpp @ 1959:45c4387a379c

Access to the HTTP headers in the "IncomingHttpRequestFilter()" callback
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 07 Apr 2016 16:26:22 +0200
parents b1291df2f780
children 3eefb84ac0bd
line wrap: on
line diff
--- a/Core/Lua/LuaFunctionCall.cpp	Wed Apr 06 14:41:26 2016 +0200
+++ b/Core/Lua/LuaFunctionCall.cpp	Thu Apr 07 16:26:22 2016 +0200
@@ -152,4 +152,18 @@
       throw OrthancException(ErrorCode_LuaReturnsNoString);
     }
   }
+
+
+  void LuaFunctionCall::PushStringMap(const std::map<std::string, std::string>& value)
+  {
+    Json::Value json = Json::objectValue;
+
+    for (std::map<std::string, std::string>::const_iterator
+           it = value.begin(); it != value.end(); ++it)
+    {
+      json[it->first] = it->second;
+    }
+
+    PushJson(json);
+  }
 }