I am trying to run get_payments method of wallet rpc.
Got this error
Warning: Binary output can mess up your terminal. Use "--output -" to tell Warning: curl to output it to your terminal anyway, or consider "--output Warning: " to save to a file.
Then I tried to run it from .net like this:
var str = "{\"jsonrpc\":\"2.0\",\"id\":\"0\",\"method\":\"get_payments\",\"params\":{\"payment_id\":\"60900e5603bf96e3\"}}";
var httpWebRequest = (HttpWebRequest) WebRequest.Create ("http://127.0.0.1:18082/json");
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "POST";
using (var streamWriter = new StreamWriter (httpWebRequest.GetRequestStream ())) {
string json = str;
streamWriter.Write (json);
}
string result;
var httpResponse = (HttpWebResponse) httpWebRequest.GetResponse ();
using (var streamReader = new StreamReader (httpResponse.GetResponseStream ())) {
result = streamReader.ReadToEnd ();
System.Console.WriteLine (result);
}
//string final = JsonConvert.DeserializeObject(result, new JsonSerializerSettings { Formatting = Formatting.Indented });
var x = result.ToString ();
string resultfinal = x.Replace ("\\n", string.Empty).Replace ("\\", "");
string j = JsonConvert.SerializeObject (result);
return resultfinal;
And got Internal Server Error.
WebException: The operation has timed out.
I have payment Id, how do I get payment information?
18082
that port correct? Have you tried using curl?/json
also should be/json_rpc
.