Mercurial > hg > orthanc-stone
comparison OrthancStone/Sources/Toolbox/OrthancDatasets/OrthancHttpConnection.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 | d3d883c3af65 |
comparison
equal
deleted
inserted
replaced
1759:7428da2bb94d | 1760:e38b9875a969 |
---|---|
64 { | 64 { |
65 boost::mutex::scoped_lock lock(mutex_); | 65 boost::mutex::scoped_lock lock(mutex_); |
66 | 66 |
67 client_.SetMethod(Orthanc::HttpMethod_Post); | 67 client_.SetMethod(Orthanc::HttpMethod_Post); |
68 client_.SetUrl(url_ + uri); | 68 client_.SetUrl(url_ + uri); |
69 client_.SetBody(body); | 69 client_.SetExternalBody(body); |
70 client_.ApplyAndThrowException(result); | 70 client_.ApplyAndThrowException(result); |
71 client_.ClearBody(); | |
71 } | 72 } |
72 | 73 |
73 | 74 |
74 void OrthancHttpConnection::RestApiPut(std::string& result, | 75 void OrthancHttpConnection::RestApiPut(std::string& result, |
75 const std::string& uri, | 76 const std::string& uri, |
77 { | 78 { |
78 boost::mutex::scoped_lock lock(mutex_); | 79 boost::mutex::scoped_lock lock(mutex_); |
79 | 80 |
80 client_.SetMethod(Orthanc::HttpMethod_Put); | 81 client_.SetMethod(Orthanc::HttpMethod_Put); |
81 client_.SetUrl(url_ + uri); | 82 client_.SetUrl(url_ + uri); |
82 client_.SetBody(body); | 83 client_.SetExternalBody(body); |
83 client_.ApplyAndThrowException(result); | 84 client_.ApplyAndThrowException(result); |
85 client_.ClearBody(); | |
84 } | 86 } |
85 | 87 |
86 | 88 |
87 void OrthancHttpConnection::RestApiDelete(const std::string& uri) | 89 void OrthancHttpConnection::RestApiDelete(const std::string& uri) |
88 { | 90 { |