Mercurial > hg > orthanc
diff OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp @ 5171:6b07c1a14d55
cpp wrapper
author | Alain Mazy <am@osimis.io> |
---|---|
date | Thu, 02 Mar 2023 15:08:02 +0100 |
parents | 688b83f915bc |
children | 0ea402b4d901 |
line wrap: on
line diff
--- 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,