title: Requesting to github-api using .net HttpClient says Forbidden
body: <p>I am trying to getting data from this github api link <a href="https://api.github.com/users/arif2009" rel="noreferrer">https://api.github.com/users/arif2009</a> . It works fine using posman get request.</p>
  
  <p>But if i try to get data using <strong>.net HttpClient</strong> then it says <strong>Forbidden</strong>.</p>
  
  <p>C# code:</p>
  
  <pre><code>using (var client = new HttpClient())
  {
      client.BaseAddress = new Uri("https://api.github.com/");
      client.DefaultRequestHeaders.Accept.Clear();
      client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
  
      var response = await client.GetAsync("users/arif2009");
  
      if (response.IsSuccessStatusCode)
      {
          var data = response.Content.ReadAsAsync&lt;GithubUser&gt;();
      }
  }
  </code></pre>
  
  <p>Response:
  <a href="https://i.stack.imgur.com/FVsuF.png" rel="noreferrer"><img src="https://i.stack.imgur.com/FVsuF.png" alt="enter image description here"></a></p>
  
  <p>Can anybody tell me where i made the mistake?</p>