aboutsummaryrefslogtreecommitdiff
path: root/src/httpserver.cpp
diff options
context:
space:
mode:
authorJonas Schnelli <dev@jonasschnelli.ch>2017-07-13 17:06:27 +0200
committerJonas Schnelli <dev@jonasschnelli.ch>2017-07-17 17:42:09 +0200
commit31e07203bd98d69be476cbff105ad659b4efa862 (patch)
tree3a253cbb5503d25dd100d9755b6529061deb3bee /src/httpserver.cpp
parentdd2185c291a72e2d685746c97d6eb7c22f87226d (diff)
downloadbitcoin-31e07203bd98d69be476cbff105ad659b4efa862.tar.xz
Add wallet endpoint support to bitcoin-cli (-usewallet)
Diffstat (limited to 'src/httpserver.cpp')
-rw-r--r--src/httpserver.cpp11
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;
+}