Mercurial > hg > orthanc-stone
diff OrthancStone/Sources/Toolbox/OrthancDatasets/OrthancHttpConnection.cpp @ 1776:d3d883c3af65
backward compatibility with Orthanc framework <= 1.9.2
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 14 May 2021 07:34:14 +0200 |
parents | e38b9875a969 |
children | 3889ae96d2e9 |
line wrap: on
line diff
--- 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 }