From 31e07203bd98d69be476cbff105ad659b4efa862 Mon Sep 17 00:00:00 2001 From: Jonas Schnelli Date: Thu, 13 Jul 2017 17:06:27 +0200 Subject: Add wallet endpoint support to bitcoin-cli (-usewallet) --- src/httpserver.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/httpserver.cpp') diff --git a/src/httpserver.cpp b/src/httpserver.cpp index 290a2efca..ba0125540 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; +} -- cgit v1.2.3