Mercurial > hg > orthanc
comparison 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 |
comparison
equal
deleted
inserted
replaced
5170:3e6dbf4a018d | 5171:6b07c1a14d55 |
---|---|
1454 answer.ToString(result); | 1454 answer.ToString(result); |
1455 return true; | 1455 return true; |
1456 } | 1456 } |
1457 } | 1457 } |
1458 | 1458 |
1459 | |
1460 bool RestApiGet(Json::Value& result, | |
1461 const std::string& uri, | |
1462 const std::map<std::string, std::string>& httpHeaders, | |
1463 bool applyPlugins) | |
1464 { | |
1465 MemoryBuffer answer; | |
1466 | |
1467 if (!answer.RestApiGet(uri, httpHeaders, applyPlugins)) | |
1468 { | |
1469 return false; | |
1470 } | |
1471 else | |
1472 { | |
1473 if (!answer.IsEmpty()) | |
1474 { | |
1475 answer.ToJson(result); | |
1476 } | |
1477 return true; | |
1478 } | |
1479 } | |
1459 | 1480 |
1460 | 1481 |
1461 bool RestApiGet(Json::Value& result, | 1482 bool RestApiGet(Json::Value& result, |
1462 const std::string& uri, | 1483 const std::string& uri, |
1463 bool applyPlugins) | 1484 bool applyPlugins) |