1 // Copyright (c) 2015-present The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5 #ifndef BITCOIN_COMMON_URL_H
6 #define BITCOIN_COMMON_URL_H
7
8 #include <string>
9 #include <string_view>
10
11 /* Decode a URL.
12 *
13 * Notably this implementation does not decode a '+' to a ' '.
14 */
15 std::string UrlDecode(std::string_view url_encoded);
16
17 /* Encode a URL. */
18 std::string UrlEncode(std::string_view str);
19
20 #endif // BITCOIN_COMMON_URL_H
21