Fabcoin Core
0.16.2
P2P Digital Currency
|
#include <fs.h>
#include <list>
#include <map>
#include <stdint.h>
#include <string>
#include <univalue.h>
Go to the source code of this file.
Functions | |
UniValue | JSONRPCRequestObj (const std::string &strMethod, const UniValue ¶ms, const UniValue &id) |
JSON-RPC protocol. More... | |
UniValue | JSONRPCReplyObj (const UniValue &result, const UniValue &error, const UniValue &id) |
std::string | JSONRPCReply (const UniValue &result, const UniValue &error, const UniValue &id) |
UniValue | JSONRPCError (int code, const std::string &message) |
bool | GenerateAuthCookie (std::string *cookie_out) |
Generate a new RPC authentication cookie and write it to disk. More... | |
bool | GetAuthCookie (std::string *cookie_out) |
Read the RPC authentication cookie from disk. More... | |
void | DeleteAuthCookie () |
Delete RPC authentication cookie from disk. More... | |
enum HTTPStatusCode |
HTTP status codes.
Enumerator | |
---|---|
HTTP_OK | |
HTTP_BAD_REQUEST | |
HTTP_UNAUTHORIZED | |
HTTP_FORBIDDEN | |
HTTP_NOT_FOUND | |
HTTP_BAD_METHOD | |
HTTP_INTERNAL_SERVER_ERROR | |
HTTP_SERVICE_UNAVAILABLE |
Definition at line 19 of file protocol.h.
enum RPCErrorCode |
Fabcoin RPC error codes.
Definition at line 32 of file protocol.h.
void DeleteAuthCookie | ( | ) |
Delete RPC authentication cookie from disk.
Definition at line 129 of file protocol.cpp.
bool GenerateAuthCookie | ( | std::string * | cookie_out | ) |
Generate a new RPC authentication cookie and write it to disk.
the umask determines what permissions are used to create this file - these are set to 077 in init.cpp unless overridden with -sysperms.
Definition at line 81 of file protocol.cpp.
bool GetAuthCookie | ( | std::string * | cookie_out | ) |
Read the RPC authentication cookie from disk.
Definition at line 113 of file protocol.cpp.
UniValue JSONRPCError | ( | int | code, |
const std::string & | message | ||
) |
Definition at line 36 of file protocol.cpp.
UniValue JSONRPCRequestObj | ( | const std::string & | strMethod, |
const UniValue & | params, | ||
const UniValue & | id | ||
) |
JSON-RPC protocol.
Fabcoin speaks version 1.0 for maximum compatibility, but uses JSON-RPC 1.1/2.0 standards for parts of the 1.0 standard that were unspecified (HTTP errors and contents of 'error').
1.0 spec: http://json-rpc.org/wiki/specification 1.2 spec: http://jsonrpc.org/historical/json-rpc-over-http.html
Definition at line 27 of file protocol.cpp.