Mercurial > hg > orthanc
diff OrthancFramework/Sources/HttpServer/HttpToolbox.cpp @ 4605:c8f444e8556d
new function in the plugin SDK: OrthancPluginCallRestApi()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 30 Mar 2021 16:34:02 +0200 |
parents | d9473bd5ed43 |
children | 7053502fbf97 |
line wrap: on
line diff
--- a/OrthancFramework/Sources/HttpServer/HttpToolbox.cpp Wed Mar 17 15:48:31 2021 +0100 +++ b/OrthancFramework/Sources/HttpServer/HttpToolbox.cpp Tue Mar 30 16:34:02 2021 +0200 @@ -191,7 +191,7 @@ const std::string& uri, const Arguments& httpHeaders) { - return IHttpHandler::SimpleGet(result, handler, origin, uri, httpHeaders); + return (IHttpHandler::SimpleGet(result, NULL, handler, origin, uri, httpHeaders) == HttpStatus_200_Ok); } bool HttpToolbox::SimplePost(std::string& result, @@ -202,7 +202,8 @@ size_t bodySize, const Arguments& httpHeaders) { - return IHttpHandler::SimplePost(result, handler, origin, uri, bodyData, bodySize, httpHeaders); + return (IHttpHandler::SimplePost(result, NULL, handler, origin, uri, + bodyData, bodySize, httpHeaders) == HttpStatus_200_Ok); } bool HttpToolbox::SimplePut(std::string& result, @@ -213,7 +214,8 @@ size_t bodySize, const Arguments& httpHeaders) { - return IHttpHandler::SimplePut(result, handler, origin, uri, bodyData, bodySize, httpHeaders); + return (IHttpHandler::SimplePut(result, NULL, handler, origin, uri, + bodyData, bodySize, httpHeaders) == HttpStatus_200_Ok); } bool HttpToolbox::SimpleDelete(IHttpHandler& handler, @@ -221,7 +223,7 @@ const std::string& uri, const Arguments& httpHeaders) { - return IHttpHandler::SimpleDelete(handler, origin, uri, httpHeaders); + return (IHttpHandler::SimpleDelete(NULL, handler, origin, uri, httpHeaders) == HttpStatus_200_Ok); } #endif }