I am trying to make a call to below URL and it works just fine in Browser (Chrome) and also in Postman, but for some reason, it doesn\'t work in C#.
Working in b
Thanks to Joshua & Vhoang!
It's working after I changed code to below:
var client = new RestClient("http://presta.craftingcrow.com/api/categories");
var request = new RestRequest(Method.GET);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("Authorization", "Basic " + Convert.ToBase64String(Encoding.Default.GetBytes("AJWKBLWT47VR26QWPNFCPJLXC6217F6F:"));
IRestResponse response = client.Execute(request);
There was no need to add user-agent or include key in the hostname (URL)