Mercurial > hg > orthanc
diff OrthancServer/Sources/LuaScripting.cpp @ 4606:d01702fb29a9 db-changes
integration mainline->db-changes
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 30 Mar 2021 16:34:23 +0200 |
parents | 456ed3fcff81 c8f444e8556d |
children | 569d9ef165b1 |
line wrap: on
line diff
--- a/OrthancServer/Sources/LuaScripting.cpp Tue Mar 30 10:39:59 2021 +0200 +++ b/OrthancServer/Sources/LuaScripting.cpp Tue Mar 30 16:34:23 2021 +0200 @@ -452,8 +452,8 @@ try { std::string result; - if (IHttpHandler::SimpleGet(result, serverContext->GetHttpHandler().RestrictToOrthancRestApi(builtin), - RequestOrigin_Lua, uri, headers)) + if (IHttpHandler::SimpleGet(result, NULL, serverContext->GetHttpHandler().RestrictToOrthancRestApi(builtin), + RequestOrigin_Lua, uri, headers) == HttpStatus_200_Ok) { lua_pushlstring(state, result.c_str(), result.size()); return 1; @@ -505,10 +505,12 @@ { std::string result; if (isPost ? - IHttpHandler::SimplePost(result, serverContext->GetHttpHandler().RestrictToOrthancRestApi(builtin), - RequestOrigin_Lua, uri, bodyData, bodySize, headers) : - IHttpHandler::SimplePut(result, serverContext->GetHttpHandler().RestrictToOrthancRestApi(builtin), - RequestOrigin_Lua, uri, bodyData, bodySize, headers)) + IHttpHandler::SimplePost(result, NULL, + serverContext->GetHttpHandler().RestrictToOrthancRestApi(builtin), + RequestOrigin_Lua, uri, bodyData, bodySize, headers) == HttpStatus_200_Ok : + IHttpHandler::SimplePut(result, NULL, + serverContext->GetHttpHandler().RestrictToOrthancRestApi(builtin), + RequestOrigin_Lua, uri, bodyData, bodySize, headers) == HttpStatus_200_Ok) { lua_pushlstring(state, result.c_str(), result.size()); return 1; @@ -569,8 +571,8 @@ try { - if (IHttpHandler::SimpleDelete(serverContext->GetHttpHandler().RestrictToOrthancRestApi(builtin), - RequestOrigin_Lua, uri, headers)) + if (IHttpHandler::SimpleDelete(NULL, serverContext->GetHttpHandler().RestrictToOrthancRestApi(builtin), + RequestOrigin_Lua, uri, headers) == HttpStatus_200_Ok) { lua_pushboolean(state, 1); return 1;