i am getting this error from API call; any one has an idea how to fix it?
var httpWebRequest = (HttpWebRequest)WebRequest.Create(apiUrl + “/zones/” + dnsZoneId + “/dns_records/” + dnsRecordId);
httpWebRequest.ReadWriteTimeout = 100000;
httpWebRequest.ContentType = “application/json”;
//httpWebRequest.Accept = “/”;
httpWebRequest.Method = “GET”;
httpWebRequest.Headers.Add(“X-Auth-Email”, authEmail);
httpWebRequest.Headers.Add(“X-Auth-Key”, authKey);
try
{
HttpWebResponse resp = (HttpWebResponse)httpWebRequest.GetResponse();
string respStr = new StreamReader(resp.GetResponseStream()).ReadToEnd();
var data = (JObject)JsonConvert.DeserializeObject(respStr);
string currentIP = data["result"]["content"].ToString();
return currentIP;
}
catch (Exception ex)
{
throw ex;
}