title: What is -u flag on cURL actually doing?
body: <p>I'm looking at Stripe's cURL example for getting info on an event.</p>
  
  <p>They have me do:</p>
  
  <pre><code>curl https://api.stripe.com/v1/events/evt_123 \
     -u sk_test_somekey:
  </code></pre>
  
  <p>The documentation for cURL states that <code>-u</code> does <code>USER:PASSWORD</code>.</p>
  
  <p>When I tried sending this as <code>-d</code> or as a query <code>?</code>, Stripe's API says that I'm missing a header. This doesn't seem right.</p>
  
  <p>I don't understand the lack of password after the username, either. If I send that cURL without the <code>:</code>, I am prompted for a password. Hitting enter (no characters inputted), gets me the expected response.</p>
  
  <p>So, what exactly is <code>-u</code> doing so I can imitate this call in my code?</p>