comparison 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
comparison
equal deleted inserted replaced
1445:d26c8a93d05a 1446:8dc80ba768aa
98 static void ExecuteScript(RestApiPostCall& call) 98 static void ExecuteScript(RestApiPostCall& call)
99 { 99 {
100 std::string result; 100 std::string result;
101 ServerContext& context = OrthancRestApi::GetContext(call); 101 ServerContext& context = OrthancRestApi::GetContext(call);
102 102
103 std::string command;
104 call.BodyToString(command);
105
103 { 106 {
104 LuaScripting::Locker locker(context.GetLua()); 107 LuaScripting::Locker locker(context.GetLua());
105 locker.GetLua().Execute(result, call.GetPostBody()); 108 locker.GetLua().Execute(result, command);
106 } 109 }
107 110
108 call.GetOutput().AnswerBuffer(result, "text/plain"); 111 call.GetOutput().AnswerBuffer(result, "text/plain");
109 } 112 }
110 113