Mercurial > hg > orthanc-stone
changeset 60:288c948199e5 wasm
cont
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 10 May 2017 16:10:47 +0200 |
parents | d2adc6189a95 |
children | ca644004d2ee |
files | Framework/Toolbox/IWebService.h Framework/Toolbox/OrthancWebService.cpp |
diffstat | 2 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/Framework/Toolbox/IWebService.h Wed May 10 11:34:06 2017 +0200 +++ b/Framework/Toolbox/IWebService.h Wed May 10 16:10:47 2017 +0200 @@ -40,9 +40,10 @@ virtual void NotifyError(const std::string& uri, Orthanc::IDynamicObject* payload) = 0; - virtual void NotifyAnswer(const std::string& uri, - const std::string& answer, - Orthanc::IDynamicObject* payload) = 0; + virtual void NotifySuccess(const std::string& uri, + const void* answer, + size_t answerSize, + Orthanc::IDynamicObject* payload) = 0; }; virtual ~IWebService()
--- a/Framework/Toolbox/OrthancWebService.cpp Wed May 10 11:34:06 2017 +0200 +++ b/Framework/Toolbox/OrthancWebService.cpp Wed May 10 16:10:47 2017 +0200 @@ -50,7 +50,7 @@ { std::string answer; orthanc_->RestApiGet(answer, uri); - callback.NotifyAnswer(uri, answer, tmp.release()); + callback.NotifySuccess(uri, answer.c_str(), answer.size(), tmp.release()); } catch (Orthanc::OrthancException&) { @@ -69,7 +69,7 @@ { std::string answer; orthanc_->RestApiPost(answer, uri, body); - callback.NotifyAnswer(uri, answer, tmp.release()); + callback.NotifySuccess(uri, answer.c_str(), answer.size(), tmp.release()); } catch (Orthanc::OrthancException&) {