具有GetAsync()的System.Net.Http.HttpClient。结果未返回所有数据

时间:2016-07-06 15:05:53

标签: c# asp.net dotnet-httpclient

我们对API进行了这种异步调用,该调用使用.Result进行阻塞调用。

这里的问题是,我们没有获得所有数据,这应该是大约1800个条目..我们只得到大约16或17 pr。调用..

HttpResponseMessage response = client.GetAsync(urlRecipe2Parameters).Result;  // Blocking call!
       if (response.IsSuccessStatusCode)
       {
           var responseContent = response.Content;
           string responseString = responseContent.ReadAsStringAsync().Result;

任何人都知道这个以及如何确定在继续之前获取所有记录?

泰耶。

0 个答案:

没有答案