diff options
| author | Jonas Schnelli <[email protected]> | 2017-07-13 17:06:27 +0200 |
|---|---|---|
| committer | Jonas Schnelli <[email protected]> | 2017-07-17 17:42:09 +0200 |
| commit | 31e07203bd98d69be476cbff105ad659b4efa862 (patch) | |
| tree | 3a253cbb5503d25dd100d9755b6529061deb3bee /src/httpserver.cpp | |
| parent | Register wallet endpoint (diff) | |
| download | discoin-31e07203bd98d69be476cbff105ad659b4efa862.tar.xz discoin-31e07203bd98d69be476cbff105ad659b4efa862.zip | |
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 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; +} |