diff --git a/etcd/Client.hpp b/etcd/Client.hpp index 72552a3..e4b846f 100644 --- a/etcd/Client.hpp +++ b/etcd/Client.hpp @@ -102,11 +102,6 @@ namespace etcd */ pplx::task ls(std::string const & key); - /** - * Creates a new directory node. Fails if the parent directory dos not exists or not a directory. - * @param key is the directory to be created to be listed - */ - pplx::task mkdir(std::string const & key); /** * Removes a directory node. Fails if the parent directory dos not exists or not a directory. @@ -135,10 +130,6 @@ namespace etcd protected: - pplx::task send_put_request(web::http::uri_builder & uri, std::string const & key, std::string const & value); - - web::http::client::http_client client; - std::unique_ptr stub_; std::unique_ptr watchServiceStub; diff --git a/src/Client.cpp b/src/Client.cpp index 7f31e05..66dbbfa 100644 --- a/src/Client.cpp +++ b/src/Client.cpp @@ -20,7 +20,6 @@ using etcdserverpb::WatchResponse; using etcdserverpb::WatchCreateRequest; etcd::Client::Client(std::string const & address) - : client(address) { std::string stripped_address(address); std::string substr("http://"); @@ -34,12 +33,6 @@ etcd::Client::Client(std::string const & address) watchServiceStub= Watch::NewStub(channel); } -pplx::task etcd::Client::send_put_request(web::http::uri_builder & uri, std::string const & key, std::string const & value) -{ - std::string data = key + "=" + value; - std::string content_type = "application/x-www-form-urlencoded; param=" + key; - return Response::create(client.request(web::http::methods::PUT, uri.to_string(), data.c_str(), content_type.c_str())); -} pplx::task etcd::Client::get(std::string const & key) { @@ -93,12 +86,6 @@ pplx::task etcd::Client::rm_if(std::string const & key, int old_ } -pplx::task etcd::Client::mkdir(std::string const & key) -{ - web::http::uri_builder uri("/v2/keys" + key); - return send_put_request(uri, "dir", "true"); -} - pplx::task etcd::Client::rmdir(std::string const & key, bool recursive) {