9 const std::map<std::string, std::string>
HTTPInterface::get(
const std::vector<std::string>& json_keys,
10 const std::string& command,
11 const std::initializer_list<param_type>& list)
17 return get_(json_keys, res);
20 const std::map<std::string, std::string>
HTTPInterface::get(
const std::vector<std::string>& json_keys,
27 return get_(json_keys, res);
30 const std::map<std::string, std::string>
HTTPInterface::get_(
const std::vector<std::string>& json_keys,
33 Json::Value json_resp;
34 std::map<std::string, std::string> json_kv;
39 json_kv[std::string(
"error_http")] = std::string(
"OK");
41 catch (curlpp::RuntimeError& e)
43 json_kv[std::string(
"error_http")] = std::string(e.what());
46 catch (curlpp::LogicError& e)
48 json_kv[std::string(
"error_http")] = std::string(e.what());
52 for (std::string key : json_keys)
56 if (json_resp[key].isArray())
59 json_kv[key] = json_resp[key].asString();
61 catch (std::exception& e)
63 json_kv[key] =
"--COULD NOT RETRIEVE VALUE--";