title: How to cURL an Authenticated Django App?
body: <p>I've a few APIs I'd like to test with cURL. I tried doing a GET as follows:</p>
  
  <pre><code>curl --user username:password --request GET http://my_domain/get_result/52d6428f3ea9a008358ad2d8/
  </code></pre>
  
  <p>On the server, it showed a '302' (which means redirection, right?). I'm guessing it redirected to the 'login/' page.</p>
  
  <p>What is the proper way of getting this done?</p>
  
  <p><strong>Edit</strong>: I tried:</p>
  
  <pre><code>curl -c cookies.txt -b cookies.txt -L -d @login_form.txt http://my_domain/login/
  </code></pre>
  
  <p>where login_form.txt contains "username=username&amp;password=password&amp;this_is_the_login_form=1". Doesn't work. No cookies.txt files generated. And no login happening. Can you tell me how you achieve login to Django using cURL?</p>