# HG changeset patch # User Sebastien Jodogne # Date 1620118944 -7200 # Node ID e38b9875a969fd31a56fad58c10ccb47dcac9531 # Parent 7428da2bb94dc8dc98137c623e824d4eaa1dfe8a adaptation to change in API of Orthanc::HttpClient diff -r 7428da2bb94d -r e38b9875a969 OrthancStone/Sources/Oracle/GenericOracleRunner.cpp --- a/OrthancStone/Sources/Oracle/GenericOracleRunner.cpp Mon Apr 26 20:43:00 2021 +0200 +++ b/OrthancStone/Sources/Oracle/GenericOracleRunner.cpp Tue May 04 11:02:24 2021 +0200 @@ -127,10 +127,12 @@ if (command.GetMethod() == Orthanc::HttpMethod_Post || command.GetMethod() == Orthanc::HttpMethod_Put) { - client.SetBody(command.GetBody()); + client.SetExternalBody(command.GetBody()); } client.ApplyAndThrowException(answer, answerHeaders); + client.ClearBody(); + DecodeAnswer(answer, answerHeaders); } @@ -163,10 +165,11 @@ if (command.GetMethod() == Orthanc::HttpMethod_Post || command.GetMethod() == Orthanc::HttpMethod_Put) { - client.SetBody(command.GetBody()); + client.SetExternalBody(command.GetBody()); } client.ApplyAndThrowException(answer, answerHeaders); + client.ClearBody(); DecodeAnswer(answer, answerHeaders); } diff -r 7428da2bb94d -r e38b9875a969 OrthancStone/Sources/Toolbox/OrthancDatasets/OrthancHttpConnection.cpp --- a/OrthancStone/Sources/Toolbox/OrthancDatasets/OrthancHttpConnection.cpp Mon Apr 26 20:43:00 2021 +0200 +++ b/OrthancStone/Sources/Toolbox/OrthancDatasets/OrthancHttpConnection.cpp Tue May 04 11:02:24 2021 +0200 @@ -66,8 +66,9 @@ client_.SetMethod(Orthanc::HttpMethod_Post); client_.SetUrl(url_ + uri); - client_.SetBody(body); + client_.SetExternalBody(body); client_.ApplyAndThrowException(result); + client_.ClearBody(); } @@ -79,8 +80,9 @@ client_.SetMethod(Orthanc::HttpMethod_Put); client_.SetUrl(url_ + uri); - client_.SetBody(body); + client_.SetExternalBody(body); client_.ApplyAndThrowException(result); + client_.ClearBody(); }