1 #ifndef RAPP_CLOUD_GEOLOCATION
2 #define RAPP_CLOUD_GEOLOCATION
22 const std::string ipaddr,
23 const std::string engine,
24 const std::string token,
25 std::function<
void(std::string)> callback
29 boost::property_tree::ptree tree;
30 tree.put(
"ipaddr", ipaddr);
31 tree.put(
"engine", engine);
33 boost::property_tree::write_json(ss, tree,
false);
35 header_ =
"POST /hop/geolocation HTTP/1.1\r\n"
36 +
"Content-Type: application/x-www-form-urlencoded\r\n";
45 std::stringstream ss(json);
std::string header_
Header that will be used.
geolocation(const std::string ipaddr, const std::string engine, const std::string token, std::function< void(std::string)> callback)
void handle_reply(std::string json)
handle platform's JSON reply
std::string post_
Actual post Data.
std::function< void(std::string)> callback_
Callback Handler - use with std::bind or boost variant.
base class for asynchronous http websockets used for connecting to cloud services ...
std::function< void(std::string)> delegate_