Hello,
just getting used to this wonderful library.
As i have already experienced in .NET and HttpWebRequest, if i don't set a proxy or bypass it, the requests are very slow (more than 5 secs even on local dev machine).
The same happens in RestSharp, so the following out of the box code is slow:
var client = new RestClient("http://mydev.test/api");
RestRequest request = new RestRequest("customer/{id}", Method.GET);
RestResponse response = (RestResponse) client.Execute(request);
if i set the client.Proxy to null nothing changes (it was already null).
If i use recommended methods like
client.Proxy = System.Net.HttpWebRequest.GetSystemWebProxy();
or
client.Proxy = System.Net.HttpWebRequest.DefaultWebProxy;
the same happens, slow initial response.
The only way that works is through a deprecated method:
client.Proxy = System.Net.HttpWebRequest.DefaultWebProxy;
this will make the request fast as lightning, but it's deprecated, so will it fail some day?
Does anyone know why this behaviour is happening?
thank you
SB