46 evhttp_parse_query(evhttp_request_uri(
_req),
_req->input_headers);
47 if(
_req->type== EVHTTP_REQ_POST )
53 l= evbuffer_remove(
_req->input_buffer, buffer, 1024);
60 const char* input_query;
61 input_query= (
char *)evhttp_find_header(
_req->input_headers,
"query");
62 if(input_query == NULL || strcmp(input_query,
"")==0)
66 _query.append(input_query,strlen(input_query));
69 _schema = (
char *)evhttp_find_header(
_req->input_headers,
"schema");
70 _table = (
char *)evhttp_find_header(
_req->input_headers,
"table");
71 _id = (
char *)evhttp_find_header(
_req->input_headers,
"_id");
81 _schema = default_schema.c_str();
85 _table= default_table.c_str();
94 Json::Features json_conf;
95 Json::Reader reader(json_conf);
100 _json_out[
"error_message"]= reader.getFormattedErrorMessages();
109 const Json::Value& body_id=
_json_in[
"query"][
"_id"];
110 bool body_id_missing= body_id.isNull() ||
111 (body_id.isString() && body_id.asString().empty());
112 if (body_id_missing &&
_id)
114 _json_in[
"query"][
"_id"] = (Json::Value::UInt) atol(
_id);
120 const Json::Value &request_id=
_json_in[
"query"][
"_id"];
121 bool id_missing= request_id.isNull() ||
122 (request_id.isString() && request_id.asString().empty());
123 if(id_missing &&
_req->type==EVHTTP_REQ_DELETE && !allow_drop_table)