Mercurial > hg > orthanc
diff Plugins/Samples/Common/OrthancPluginCppWrapper.cpp @ 2979:5947aeedf41f
added C++ plugin helpers
author | am@osimis.io |
---|---|
date | Thu, 06 Dec 2018 13:10:00 +0100 |
parents | 9b734c3e1095 |
children | db8f360fcb41 |
line wrap: on
line diff
--- a/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp Thu Dec 06 11:16:23 2018 +0100 +++ b/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp Thu Dec 06 13:10:00 2018 +0100 @@ -1123,6 +1123,16 @@ OrthancPluginAnswerBuffer(GetGlobalContext(), output, bodyString.c_str(), bodyString.size(), "application/json"); } + void AnswerHttpError(uint16_t httpError, OrthancPluginRestOutput *output) + { + OrthancPluginSendHttpStatusCode(GetGlobalContext(), output, httpError); + } + + void AnswerMethodNotAllowed(OrthancPluginRestOutput *output, const char* allowedMethods) + { + OrthancPluginSendMethodNotAllowed(GetGlobalContext(), output, allowedMethods); + } + bool RestApiGetString(std::string& result, const std::string& uri, bool applyPlugins)