title: Use Invoke-WebRequest with a username and password for basic authentication on the GitHub API
body: <p>With cURL, we can pass a username with an HTTP web request as follows: </p>
  
  <pre><code>$ curl -u &lt;your_username&gt; https://api.github.com/user
  </code></pre>
  
  <p>The <code>-u</code> flag accepts a username for authentication, and then cURL will request the password. The cURL example is for <a href="https://developer.github.com/v3/auth/" rel="noreferrer">Basic authentication with the GitHub Api</a>.</p>
  
  <p>How do we similarly pass a username and password along with Invoke-WebRequest? The ultimate goal is to user PowerShell with Basic authentication in the GitHub API.</p>