I have a method, that sends city to Google Geocoding API.
Here is this method.
public static async Task<string> ChangeDestination(string city_name)
{
string result;
var realm = Realm.GetInstance();
var client = new RestClient("https://maps.googleapis.com/maps/api/geocode/json?address=");
var request = new RestRequest(city_name+"&key=***************", Method.GET);
IRestResponse response = await client.ExecuteTaskAsync(request);
var content = response.Content;
var responseData1 = JsonConvert.DeserializeObject<ChangeLocation>(content);
result = "hey";
return result;
}
In content
I get Not Found.
When I try this request from the postman. I get JSON.
Where can be my problem?