/// Sends a JSON-RPC request to rippled.
Sends a JSON-RPC request to rippled.
Sends a JSON - RPC request to rippled .
pub async fn send<Params, Resp>(&self, request: RpcRequest<Params>) -> Result<Resp>
    where
        Params: Serialize,
        Resp: DeserializeOwned,
    {
        let body = serde_json::to_string(&request).unwrap();
        debug!("POST {}", body);
        let response = self
            .http_client
            .post(&self.base_url)
            .body(body)
            .header(reqwest::header::USER_AGENT, &self.user_agent)
            .send()
            .await?;
        self.unwrap_response(response).await
    }
pub async fn send < Params , Resp > ( & self , request : RpcRequest < Params > ) -> Result < Resp > where Params : Serialize , Resp : DeserializeOwned , { let body = serde_json :: to_string ( & request ) . unwrap ( ) ; debug ! ( " " body ) ; let response = self . http_client . post ( & self . base_url ) . body ( body ) . header ( reqwest :: header :: USER_AGENT , & self . user_agent ) . send ( ) . await ? ; self . unwrap_response ( response ) . await }
Sends a JSON-RPC request to rippled.
Sends a JSON - RPC request to rippled .
&self
request
RpcRequest<Params>