Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
update an etcd key value pair
setEtcdValue(ConfigData data) {
var key = utf8.encode(data.name);
var value = utf8.encode(data.value);
String _body =
"{\"key\": \"${base64.encode(key)}\", \"value\":\"${base64.encode(value)}\"}";
print(_body);
http.post("http://localhost:2379/v3/kv/put", body: _body);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment