public async Task <BaseResult <CalculateRouteResult> > CalculateRoute(LocationPoint point1, LocationPoint point2) { var result = new BaseResult <CalculateRouteResult>(); try { var action = MethodBase.GetCurrentMethod().GetRealMethodFromAsyncMethod().GetCustomAttribute <DescriptionAttribute>(true).Description; var routeLocations = HttpUtility.UrlEncode($"{point1}:{point2}"); var endPoint = CustomHttpClient.UrlCombine(RouteEndPoint, Version_1, action, routeLocations, ResultType); var dictionary = new Dictionary <string, object>() { { "key", ApiKey }, { "travelMode", TravelMode } }; var response = await _httpClient.HttpSendAsync <CalculateRouteResult>(Url, endPoint, method : HttpMethod.Get, queryParameters : dictionary); result.OriginalString = response.OriginalDataString; if (result.Success = response.Success) { result.Data = response.Data; result.Message = GeneralSuccessMessage; } else { result.Message = GeneralErrorMessage; } } catch (Exception ex) { result.Data = null; result.Message = GeneralErrorMessage; } return(result); }