1
I’m trying to accomplish a request
in C# using the package RestSharp
, for geolocation information by passing the zip code. The request
this way was left:.
RestClient client = new RestClient("https://maps.googleapis.com/maps/api/geocode/json?address=" + cep + "&key=" + key);
RestRequest request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
But I only get TimeOut
.
The strange thing is that if I run this URL in my browser, I get result.
Can someone please help me?
Correctly configured the
key
on the google developer console? Enabled the geocode API and linked it tokey
?– Marconi
Yes, so when I run in the browser, the call works normally. I believe the problem is something related to C#, because I also made using angular and the same worked perfectly.
– Guilherme Nunes
Take a look: Calling a Web API from a. NET client (c#)
– Marconi