Mercurial > hg > orthanc-stone
comparison 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 |
comparison
equal
deleted
inserted
replaced
1759:7428da2bb94d | 1760:e38b9875a969 |
---|---|
125 } | 125 } |
126 | 126 |
127 if (command.GetMethod() == Orthanc::HttpMethod_Post || | 127 if (command.GetMethod() == Orthanc::HttpMethod_Post || |
128 command.GetMethod() == Orthanc::HttpMethod_Put) | 128 command.GetMethod() == Orthanc::HttpMethod_Put) |
129 { | 129 { |
130 client.SetBody(command.GetBody()); | 130 client.SetExternalBody(command.GetBody()); |
131 } | 131 } |
132 | 132 |
133 client.ApplyAndThrowException(answer, answerHeaders); | 133 client.ApplyAndThrowException(answer, answerHeaders); |
134 client.ClearBody(); | |
135 | |
134 DecodeAnswer(answer, answerHeaders); | 136 DecodeAnswer(answer, answerHeaders); |
135 } | 137 } |
136 | 138 |
137 | 139 |
138 static void RunInternal(boost::weak_ptr<IObserver> receiver, | 140 static void RunInternal(boost::weak_ptr<IObserver> receiver, |
161 CopyHttpHeaders(client, command.GetHttpHeaders()); | 163 CopyHttpHeaders(client, command.GetHttpHeaders()); |
162 | 164 |
163 if (command.GetMethod() == Orthanc::HttpMethod_Post || | 165 if (command.GetMethod() == Orthanc::HttpMethod_Post || |
164 command.GetMethod() == Orthanc::HttpMethod_Put) | 166 command.GetMethod() == Orthanc::HttpMethod_Put) |
165 { | 167 { |
166 client.SetBody(command.GetBody()); | 168 client.SetExternalBody(command.GetBody()); |
167 } | 169 } |
168 | 170 |
169 client.ApplyAndThrowException(answer, answerHeaders); | 171 client.ApplyAndThrowException(answer, answerHeaders); |
172 client.ClearBody(); | |
170 DecodeAnswer(answer, answerHeaders); | 173 DecodeAnswer(answer, answerHeaders); |
171 } | 174 } |
172 | 175 |
173 | 176 |
174 static void RunInternal(boost::weak_ptr<IObserver> receiver, | 177 static void RunInternal(boost::weak_ptr<IObserver> receiver, |