diff OrthancStone/Sources/Oracle/GenericOracleRunner.cpp @ 1760:e38b9875a969

adaptation to change in API of Orthanc::HttpClient
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 04 May 2021 11:02:24 +0200
parents 9ac2a65d4172
children 3889ae96d2e9
line wrap: on
line diff
--- 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);
   }