Beispiel #1
0
        public async Task <SearchListings> RunAsync(ListingAction action)
        {
            httpClient.DefaultRequestHeaders.UserAgent.TryParseAdd(
                "Mozilla/5.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)");

            return(await GetFlatAsync(action));
        }
Beispiel #2
0
        public async Task <SearchListings> GetFlatAsync(ListingAction action)
        {
            var response = httpClient.GetAsync(new Uri($"{baseUrl}{action.ListingUrl}")).Result;

            return(await response.Content.ReadAsAsync <SearchListings>());
        }