Add wallet endpoint support to bitcoin-cli (-usewallet)

This commit is contained in:
Jonas Schnelli
2017-07-13 17:06:27 +02:00
parent dd2185c291
commit 31e07203bd
3 changed files with 28 additions and 1 deletions

View File

@@ -666,3 +666,14 @@ void UnregisterHTTPHandler(const std::string &prefix, bool exactMatch)
}
}
std::string urlDecode(const std::string &urlEncoded) {
std::string res;
if (!urlEncoded.empty()) {
char *decoded = evhttp_uridecode(urlEncoded.c_str(), false, NULL);
if (decoded) {
res = std::string(decoded);
free(decoded);
}
}
return res;
}