diff OrthancServer/OrthancRestApi/OrthancRestSystem.cpp @ 1446:8dc80ba768aa

refactoring: IHttpHandler does not use std::string to hold the request body
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 01 Jul 2015 13:16:12 +0200
parents 02f5a3f5c0a0
children f967bdf8534e
line wrap: on
line diff
--- a/OrthancServer/OrthancRestApi/OrthancRestSystem.cpp	Wed Jul 01 12:30:19 2015 +0200
+++ b/OrthancServer/OrthancRestApi/OrthancRestSystem.cpp	Wed Jul 01 13:16:12 2015 +0200
@@ -100,9 +100,12 @@
     std::string result;
     ServerContext& context = OrthancRestApi::GetContext(call);
 
+    std::string command;
+    call.BodyToString(command);
+
     {
       LuaScripting::Locker locker(context.GetLua());
-      locker.GetLua().Execute(result, call.GetPostBody());
+      locker.GetLua().Execute(result, command);
     }
 
     call.GetOutput().AnswerBuffer(result, "text/plain");