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_REST_H
6 #define BITCOIN_REST_H
7 8 #include <string>
9 10 enum class RESTResponseFormat {
11 UNDEF,
12 BINARY,
13 HEX,
14 JSON,
15 };
16 17 /**
18 * Parse a URI to get the data format and URI without data format
19 * and query string.
20 *
21 * @param[out] param The strReq without the data format string and
22 * without the query string (if any).
23 * @param[in] strReq The URI to be parsed.
24 * @return RESTResponseFormat that was parsed from the URI.
25 */
26 RESTResponseFormat ParseDataFormat(std::string& param, const std::string& strReq);
27 28 #endif // BITCOIN_REST_H
29