24#include <simgear/props/props.hxx>
25#include <simgear/structure/commands.hxx>
38 response.
Header[
"Content-Type"] =
"text/plain";
42 response.
Content =
"command not specified";
46 SGPropertyNode_ptr args =
new SGPropertyNode();
47 cJSON * json = cJSON_Parse( request.
Content.c_str() );
53 if (
globals->get_commands()->execute(
command.c_str(), args,
nullptr) ) {
60 SG_LOG( SG_NETWORK, SG_WARN, response.
Content );
std::string get(const std::string &key) const
StringMap RequestVariables
static std::string toJsonString(bool indent, SGPropertyNode_ptr n, int depth, double timestamp=-1.0)
static void toProp(cJSON *json, SGPropertyNode_ptr base)
virtual bool handleRequest(const HTTPRequest &request, HTTPResponse &response, Connection *connection)
This method gets called from the httpd if a request has been detected on the connection.
FlightPlan.hxx - defines a full flight-plan object, including departure, cruise, arrival information ...
SGCommandMgr::command_t command