# HG changeset patch # User Sebastien Jodogne # Date 1620970454 -7200 # Node ID d3d883c3af6502416ecb77a873f5a11e0c4a98ca # Parent fca942f4b4a7a49ab3f30304312b133106443787 backward compatibility with Orthanc framework <= 1.9.2 diff -r fca942f4b4a7 -r d3d883c3af65 OrthancStone/Sources/Toolbox/OrthancDatasets/OrthancHttpConnection.cpp --- a/OrthancStone/Sources/Toolbox/OrthancDatasets/OrthancHttpConnection.cpp Wed May 12 19:57:50 2021 +0200 +++ b/OrthancStone/Sources/Toolbox/OrthancDatasets/OrthancHttpConnection.cpp Fri May 14 07:34:14 2021 +0200 @@ -66,9 +66,15 @@ client_.SetMethod(Orthanc::HttpMethod_Post); client_.SetUrl(url_ + uri); + +#if defined(ORTHANC_FRAMEWORK_VERSION_IS_ABOVE) && ORTHANC_FRAMEWORK_VERSION_IS_ABOVE(1, 9, 3) client_.SetExternalBody(body); client_.ApplyAndThrowException(result); client_.ClearBody(); +#else + client_.SetBody(body); + client_.ApplyAndThrowException(result); +#endif } @@ -80,9 +86,15 @@ client_.SetMethod(Orthanc::HttpMethod_Put); client_.SetUrl(url_ + uri); + +#if defined(ORTHANC_FRAMEWORK_VERSION_IS_ABOVE) && ORTHANC_FRAMEWORK_VERSION_IS_ABOVE(1, 9, 3) client_.SetExternalBody(body); client_.ApplyAndThrowException(result); client_.ClearBody(); +#else + client_.SetBody(body); + client_.ApplyAndThrowException(result); +#endif }