Added API::urldecode()
the build was successful Details

This commit is contained in:
tastytea 2018-06-28 14:19:43 +02:00
parent dd379bb573
commit 5df220913b
Signed by: tastytea
GPG Key ID: 59346E0EA35C67E5
3 changed files with 21 additions and 1 deletions

View File

@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 3.7)
project (mastodon-cpp
VERSION 0.17.1
VERSION 0.18.0
LANGUAGES CXX
)

View File

@ -143,6 +143,11 @@ const std::string API::urlencode(const std::string &str)
return curlpp::escape(str);
}
const std::string API::urldecode(const std::string &str)
{
return curlpp::unescape(str);
}
const uint_fast16_t API::register_app1(const string &instance,
const string &client_name,
const string &redirect_uri,

View File

@ -335,6 +335,21 @@ public:
*/
static const string urlencode(const string &str);
/*!
* @brief Decodes a percent-encoded string.
*
* Calls curlpp::unescape(str)
*
* See RFC 3986 section 2.1 for more info.
*
* @param str The string
*
* @return The decoded string
*
* @since 0.18.0
*/
static const string urldecode(const string &str);
/*!
* @brief Register application, step 1/2
*