Hello, i need to ask one question, how can i get parameters from httpresponse?
For example i have this output from response:
{"auth_error":"0","errors":[],"balance":{"BTC":{"BUDGET":"128.14920000","DOSTUPNO":"0.00000000","DOSTUPNO_SYST":"0.00000000"},"EUR":{"BUDGET":"27632.08","DOSTUPNO":"1.08","DOSTUPNO_SYST":"1.08"},"RUB":{"BUDGET":"0.00","DOSTUPNO":"0.00","DOSTUPNO_SYST":"0.00"},"USD":{"BUDGET":"0.00","DOSTUPNO":"0.00","DOSTUPNO_SYST":"0.00"}}}
and i need to get number for EUR balance BUDGET. How can i do this? Thanks a lot :)
this is code
1 2 3 4 5 6 7 8 9 10 11 12 13
|
var baseAddress = new Uri("https://payeer.com/ajax/api/");
using (var httpClient = new HttpClient { BaseAddress = baseAddress })
{
using (var content = new StringContent("account=xxxxxx&apiId=xxxxx&apiPass=xxxxxx&action=output&ps=xxxxxx&sumIn=1&curIn=EUR&curOut=USD¶m_ACCOUNT_NUMBER=xxxxx", System.Text.Encoding.Default, "application/x-www-form-urlencoded"))
{
using (var response = await httpClient.PostAsync("ajax/api/api.php", content))
{
string responseData = await response.Content.ReadAsStringAsync();
}
}
}
|