api test
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, “https://json.apiastro.com/planets”);
request.Headers.Add(“x-api-key”, “YOUR_API_KEY_HERE”);
var content = new StringContent(“{\r\n \”year\”: 1976,\r\n \”month\”: 6,\r\n \”date\”: 10,\r\n \”hours\”: 11,\r\n \”minutes\”: 10,\r\n \”seconds\”: 0,\r\n \”latitude\”: 18.933,\r\n \”longitude\”: 72.8166,\r\n \”timezone\”: 5.5,\r\n \”config\”: {\r\n \”observation_point\”: \”topocentric\”, /* topocentric / geocentric */\r\n \”ayanamsha\”: \”lahiri\” /* lahiri / sayana */\r\n }\r\n}”, null, “application/json”);
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());