private static string BuildUriString(SearchParameters parameters) { var uriString = string.Format(Resources.FutHostName + Resources.Search, (parameters.Page - 1) * PageSize, PageSize); parameters.BuildUriString(ref uriString); return(uriString); }
public async Task <AuctionResponse> PerformRequestAsync() { var uriString = string.Format(Resources.FutHome + Resources.TransferMarket + "?start={0}&num={1}", (_searchParameters.Page - 1) * PageSize, PageSize + 1); _searchParameters.BuildUriString(ref uriString); AddMethodOverrideHeader(HttpMethod.Get); AddCommonHeaders(); var searchResponseMessage = await HttpClient.PostAsync(uriString, new StringContent(" ")); searchResponseMessage.EnsureSuccessStatusCode(); return(await Deserialize <AuctionResponse>(searchResponseMessage)); }
public async Task <AuctionResponse> PerformRequestAsync() { var uriString = string.Format(Resources.FutHome + Resources.TransferMarket + "?start={0}&num={1}", (_searchParameters.Page - 1) * _searchParameters.PageSize, _searchParameters.PageSize + 1); _searchParameters.BuildUriString(ref uriString); Task <HttpResponseMessage> searchResponseMessageTask; AddCommonHeaders(); searchResponseMessageTask = HttpClient.GetAsync(uriString + $"&_={DateTime.Now.ToUnixTime()}"); var searchResponseMessage = await searchResponseMessageTask.ConfigureAwait(false); return(await DeserializeAsync <AuctionResponse>(searchResponseMessage).ConfigureAwait(false)); }