diff options
author | Jonas Schnelli <dev@jonasschnelli.ch> | 2017-07-13 17:06:27 +0200 |
---|---|---|
committer | Jonas Schnelli <dev@jonasschnelli.ch> | 2017-07-17 17:42:09 +0200 |
commit | 31e07203bd98d69be476cbff105ad659b4efa862 (patch) | |
tree | 3a253cbb5503d25dd100d9755b6529061deb3bee /src/httpserver.cpp | |
parent | dd2185c291a72e2d685746c97d6eb7c22f87226d (diff) |
Add wallet endpoint support to bitcoin-cli (-usewallet)
Diffstat (limited to 'src/httpserver.cpp')
-rw-r--r-- | src/httpserver.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/httpserver.cpp b/src/httpserver.cpp index 290a2efca2..ba01255400 100644 --- a/src/httpserver.cpp +++ b/src/httpserver.cpp @@ -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; +} |