Inside Bitcoin
Opening the selected file…
Inside Bitcoin
Opening the selected file…
The code behind the network, with room to understand it.
Release published 2026-10-28 · Snapshot fetched 2026-11-01. Latest stable release at fetch time; development branches and Git history are excluded. Only the selected code window and visible folders load here.
1// Copyright (c) 2015-present The Bitcoin Core developers2// Distributed under the MIT software license, see the accompanying3// file COPYING or http://www.opensource.org/licenses/mit-license.php.5#ifndef BITCOIN_HTTPRPC_H6#define BITCOIN_HTTPRPC_H8#include <any>10class JSONRPCRequest;11class UniValue;12enum HTTPStatusCode : int;14/** Start HTTP RPC subsystem.15* Precondition; HTTP and RPC has been started.16*/17bool StartHTTPRPC(const std::any& context);18/** Interrupt HTTP RPC subsystem.19*/20void InterruptHTTPRPC();21/** Stop HTTP RPC subsystem.22* Precondition; HTTP and RPC has been stopped.23*/24void StopHTTPRPC();26/** Execute a single HTTP request containing one or more JSONRPC requests.27* Specified `jreq` will be modified and `status` will be returned.28*/29UniValue ExecuteHTTPRPC(const UniValue& valRequest, JSONRPCRequest& jreq, HTTPStatusCode& status);31/** Start HTTP REST subsystem.32* Precondition; HTTP and RPC has been started.33*/34void StartREST(const std::any& context);35/** Interrupt RPC REST subsystem.36*/37void InterruptREST();38/** Stop HTTP REST subsystem.39* Precondition; HTTP and RPC has been stopped.40*/41void StopREST();43#endif // BITCOIN_HTTPRPC_H