Created
September 29, 2020 20:52
-
-
Save kirshiyin89/4029e0f10262e5f385a958b039f8d67c to your computer and use it in GitHub Desktop.
update an etcd key value pair
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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