Example #1
0
        /// <summary>
        /// Make a raw JSON RPC request with the given request object. Returns raw JSON.
        /// </summary>
        /// <param name="walletRequest">The request object.</param>
        /// <returns>The raw JSON string.</returns>
        private string MakeRawRpcRequest(DaemonRequest walletRequest)
        {
            var httpWebRequest = MakeHttpRequest(walletRequest);

            return(GetJsonResponse(httpWebRequest));
        }
Example #2
0
        /// <summary>
        /// Make an JSON RPC request, and return a JSON RPC response object with the result
        /// deserialized as the given type.
        /// </summary>
        /// <typeparam name="T">The type to deserialize the result as.</typeparam>
        /// <param name="walletRequest">The request object.</param>
        /// <returns>A JSON RPC response with the result deserialized as the given type.</returns>
        private DaemonResponse <T> MakeRpcRequest <T>(DaemonRequest walletRequest)
        {
            var httpWebRequest = MakeHttpRequest(walletRequest);

            return(GetRpcResponse <T>(httpWebRequest));
        }