mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-19 18:45:52 +00:00
Begin to bring some sanity to the RPC code.
This commit is contained in:
24
RPC.h
24
RPC.h
@@ -1,3 +1,7 @@
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
||||
#include "json/value.h"
|
||||
|
||||
enum http_status_type
|
||||
{
|
||||
@@ -19,11 +23,17 @@ enum http_status_type
|
||||
service_unavailable = 503
|
||||
};
|
||||
|
||||
#if 0
|
||||
extern std::string JSONRPCRequest(const std::string& strMethod, const json_spirit::Array& params, const json_spirit::Value& id);
|
||||
extern std::string createHTTPPost(const std::string& strMsg, const std::map<std::string,std::string>& mapRequestHeaders);
|
||||
extern int ReadHTTP(std::basic_istream<char>& stream, std::map<std::string, std::string>& mapHeadersRet, std::string& strMessageRet);
|
||||
extern std::string JSONRPCRequest(const std::string& strMethod, const Json::Value& params,
|
||||
const Json::Value& id);
|
||||
|
||||
extern std::string createHTTPPost(const std::string& strMsg,
|
||||
const std::map<std::string,std::string>& mapRequestHeaders);
|
||||
|
||||
extern int ReadHTTP(std::basic_istream<char>& stream,
|
||||
std::map<std::string, std::string>& mapHeadersRet, std::string& strMessageRet);
|
||||
|
||||
extern std::string HTTPReply(int nStatus, const std::string& strMsg);
|
||||
extern std::string JSONRPCReply(const json_spirit::Value& result, const json_spirit::Value& error, const json_spirit::Value& id);
|
||||
extern json_spirit::Object JSONRPCError(int code, const std::string& message);
|
||||
#endif
|
||||
|
||||
extern std::string JSONRPCReply(const Json::Value& result, const Json::Value& error, const Json::Value& id);
|
||||
|
||||
extern Json::Value JSONRPCError(int code, const std::string& message);
|
||||
|
||||
Reference in New Issue
Block a user