# HG changeset patch
# User Alain Mazy <am@osimis.io>
# Date 1677766082 -3600
# Node ID 6b07c1a14d5596146eac3a17cda5641ca39587b5
# Parent  3e6dbf4a018d43c00d00b236aeee6dc637e98427
cpp wrapper

diff -r 3e6dbf4a018d -r 6b07c1a14d55 OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp
--- a/OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp	Wed Mar 01 18:17:49 2023 +0100
+++ b/OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp	Thu Mar 02 15:08:02 2023 +0100
@@ -1457,6 +1457,27 @@
   }
 
 
+  bool RestApiGet(Json::Value& result,
+                  const std::string& uri,
+                  const std::map<std::string, std::string>& httpHeaders,
+                  bool applyPlugins)
+  {
+    MemoryBuffer answer;
+
+    if (!answer.RestApiGet(uri, httpHeaders, applyPlugins))
+    {
+      return false;
+    }
+    else
+    {
+      if (!answer.IsEmpty())
+      {
+        answer.ToJson(result);
+      }
+      return true;
+    }
+  }
+
 
   bool RestApiGet(Json::Value& result,
                   const std::string& uri,
diff -r 3e6dbf4a018d -r 6b07c1a14d55 OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.h
--- a/OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.h	Wed Mar 01 18:17:49 2023 +0100
+++ b/OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.h	Thu Mar 02 15:08:02 2023 +0100
@@ -535,6 +535,11 @@
                   const std::string& uri,
                   bool applyPlugins);
 
+  bool RestApiGet(Json::Value& result,
+                  const std::string& uri,
+                  const std::map<std::string, std::string>& httpHeaders,
+                  bool applyPlugins);
+
   bool RestApiGetString(std::string& result,
                         const std::string& uri,
                         bool applyPlugins);