title: how to loop through rest api without too many requests using httpClient
body: <p>I'm kinda new to async and await. Whenever I call API repeatedly I get a too many request error. So my question is who do I loop through an API call using Async and Await so I don't get penalized? See following code example.</p>
  
  <pre><code>Task &lt;IDList&gt; ListOfIDs = new Task(GetIDListAsycn);
  var result  = ListOfIDs.Wait()
  </code></pre>
  
  <p>Once I get the results, I want to loop through them and get the ID to pass to the API URL like this until I ran out of IDs:</p>
  
  <pre><code>foreach(var n in List) { client.BaseUrl (new Uri("http://api/users/n.ID"))};
  </code></pre>
  
  <p>Problem is like I said whenever I attempt this kind of logic I get too many request because the client.GetStringAsync is called so many times in short period of time.</p>