15 std::shared_ptr<ccf::RPCMap>
rpc_map,
18 const std::optional<ccf::crypto::Pem>& endorsed_node_cert_) :
33 auto node_session = std::make_shared<ccf::SessionContext>(
34 ccf::InvalidSessionId, node_cert.raw());
37 std::shared_ptr<ccf::RpcHandler> search =
38 ::http::fetch_rpc_handler(ctx,
rpc_map);
42 auto rs = ctx->get_response_status();
44 if (rs != HTTP_STATUS_OK)
46 auto ser_res = ctx->serialise_response();
47 std::string str((
char*)ser_res.data(), ser_res.size());
51 return rs == HTTP_STATUS_OK;
Definition http_node_client.h:12
virtual bool make_request(::http::Request &request) override
Definition http_node_client.h:25
HTTPNodeClient(std::shared_ptr< ccf::RPCMap > rpc_map, ccf::crypto::KeyPairPtr node_sign_kp, const ccf::crypto::Pem &self_signed_node_cert_, const std::optional< ccf::crypto::Pem > &endorsed_node_cert_)
Definition http_node_client.h:14
virtual ~HTTPNodeClient()
Definition http_node_client.h:23
Definition node_client.h:13
ccf::crypto::KeyPairPtr node_sign_kp
Definition node_client.h:16
const ccf::crypto::Pem & self_signed_node_cert
Definition node_client.h:17
std::shared_ptr< ccf::RPCMap > rpc_map
Definition node_client.h:15
const std::optional< ccf::crypto::Pem > & endorsed_node_cert
Definition node_client.h:18
Definition http_builder.h:118
std::vector< uint8_t > build_request(bool header_only=false) const
Definition http_builder.h:177
#define LOG_DEBUG_FMT
Definition logger.h:357
std::shared_ptr< KeyPair > KeyPairPtr
Definition key_pair.h:145
Definition app_interface.h:14
std::shared_ptr<::http::HttpRpcContext > make_rpc_context(std::shared_ptr< ccf::SessionContext > s, const std::vector< uint8_t > &packed)
Definition http_rpc_context.h:392