Mercurial > hg > orthanc-wsi
comparison Resources/Orthanc/Plugins/Samples/Common/OrthancHttpConnection.cpp @ 69:d529d9ce3c7e
cache for DicomPyramidInstance
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 25 Nov 2016 21:56:07 +0100 |
parents | a59fdb848a7b |
children | ff0ef01c332c |
comparison
equal
deleted
inserted
replaced
68:c619c8bd72ed | 69:d529d9ce3c7e |
---|---|
77 client_.SetMethod(Orthanc::HttpMethod_Post); | 77 client_.SetMethod(Orthanc::HttpMethod_Post); |
78 client_.SetUrl(url_ + uri); | 78 client_.SetUrl(url_ + uri); |
79 client_.SetBody(body); | 79 client_.SetBody(body); |
80 client_.ApplyAndThrowException(result); | 80 client_.ApplyAndThrowException(result); |
81 } | 81 } |
82 | |
83 | |
84 void OrthancHttpConnection::RestApiPut(std::string& result, | |
85 const std::string& uri, | |
86 const std::string& body) | |
87 { | |
88 boost::mutex::scoped_lock lock(mutex_); | |
89 | |
90 client_.SetMethod(Orthanc::HttpMethod_Put); | |
91 client_.SetUrl(url_ + uri); | |
92 client_.SetBody(body); | |
93 client_.ApplyAndThrowException(result); | |
94 } | |
95 | |
96 | |
97 void OrthancHttpConnection::RestApiDelete(const std::string& uri) | |
98 { | |
99 boost::mutex::scoped_lock lock(mutex_); | |
100 | |
101 std::string result; | |
102 | |
103 client_.SetMethod(Orthanc::HttpMethod_Delete); | |
104 client_.SetUrl(url_ + uri); | |
105 client_.ApplyAndThrowException(result); | |
106 } | |
82 } | 107 } |