Mercurial > hg > orthanc
diff Plugins/Samples/Common/OrthancPluginCppWrapper.h @ 2264:8e5e0de75839
primitives for HTTP client in plugin C++ wrapper
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 13 Feb 2017 10:39:14 +0100 |
parents | b9775db0fd9b |
children | e46b0ee6c19d |
line wrap: on
line diff
--- a/Plugins/Samples/Common/OrthancPluginCppWrapper.h Wed Feb 08 15:27:20 2017 +0100 +++ b/Plugins/Samples/Common/OrthancPluginCppWrapper.h Mon Feb 13 10:39:14 2017 +0100 @@ -67,6 +67,8 @@ void Check(OrthancPluginErrorCode code); + bool CheckHttp(OrthancPluginErrorCode code); + public: MemoryBuffer(OrthancPluginContext* context); @@ -152,6 +154,20 @@ OrthancPluginDicomToJsonFormat format, OrthancPluginDicomToJsonFlags flags, uint32_t maxStringLength); + + bool HttpGet(const std::string& url, + const std::string& username, + const std::string& password); + + bool HttpPost(const std::string& url, + const std::string& body, + const std::string& username, + const std::string& password); + + bool HttpPut(const std::string& url, + const std::string& body, + const std::string& username, + const std::string& password); }; @@ -407,6 +423,11 @@ const std::string& uri, bool applyPlugins); + bool HttpDelete(OrthancPluginContext* context, + const std::string& url, + const std::string& username, + const std::string& password); + inline void LogError(OrthancPluginContext* context, const std::string& message) {