I'm trying the following code to execute a GET request using C#.
using (WebClient wc = new WebClient())
{
string url = the url;
wc.Headers.Add("Authorization", "Bearer token");
var json = wc.DownloadData(url);
Console.Write(json);
}
However, I always get timeout expired exception. I tried the same get request on https://www.hurl.it/ and was successfully able to get response. Am I missing something. I'm using all the parameters in the url.