/// <summary>
        /// Invokes places search webservice
        /// <param name="searchString">Search string</param>
        /// <param name="request">Autocomplete request specifying additional components in the search Url to be generated</param>
        /// <returns>Place result with predictions</returns>
        /// </summary>
        public async Task <OperationResult <PlaceResponse> > SearchAsync(string searchString, AutocompleteRequest request)
        {
            if (string.IsNullOrWhiteSpace(searchString))
            {
                return(OperationResult <PlaceResponse> .AsFailure("PlaceId cannot be empty"));
            }

            var url = _urlFactory.BuildSearchUrl(searchString, request);

            using (var client = new HttpClient())
            {
                AcceptJsonResponse(client);

                var response = await client.GetAsync(url).ConfigureAwait(false);

                if (!response.IsSuccessStatusCode)
                {
                    return(OperationResult <PlaceResponse> .AsFailure(response.ReasonPhrase));
                }

                var content = await response.Content.ReadAsStringAsync().ConfigureAwait(false);

                var result = JsonConvert.DeserializeObject <PlaceResponse>(content);
                return(OperationResult <PlaceResponse> .AsSuccess(result));
            }
        }
        /// <summary>
        /// Invokes places search webservice
        /// <param name="searchString">Search string</param>
        /// <param name="request">Autocomplete request specifying additional components in the search Url to be generated</param>
        /// <returns>Place result with predictions</returns>
        /// </summary>
        public Task <OperationResult <PlaceResponse> > SearchAsync(string searchString, AutocompleteRequest request)
        {
            if (string.IsNullOrWhiteSpace(searchString))
            {
                Task.Run(() =>
                {
                    return(OperationResult <DetailsResponse> .AsFailure("PlaceId cannot be empty"));
                });
            }

            var url = _urlFactory.BuildSearchUrl(searchString, request);

            using (var client = new HttpClient())
            {
                client.DefaultRequestHeaders.Add("Content-Type", "application/json;charset=utf-8");

                return(client.GetStringAsync(url)
                       .ContinueWith(response =>
                {
                    var result = JsonConvert.DeserializeObject <PlaceResponse>(response.Result);
                    return OperationResult <PlaceResponse> .AsSuccess(result);
                }));
            }
        }