title: How to download file using curl with username/password and cookies?
body: <p>I am trying to download data from secure HTTP.  I need to pass cookies in order to get past the login and download the data.  I try:</p>
  
  <blockquote>
    <p>curl --u "username" --d "<a href="https://url.datasite.login" rel="nofollow noreferrer">https://url.datasite.login</a>" --cookie-jar
    auth.cookies</p>
    
    <p>curl --cookie auth.cookies -O "<a href="https://url.datalocation.file" rel="nofollow noreferrer">https://url.datalocation.file</a>"</p>
  </blockquote>
  
  <p>However after running the first command I'm given:</p>
  
  <blockquote>
    <p>curl:  no URL specified!</p>
  </blockquote>
  
  <p>I've tried rearranging the order, changing quotations, using &lt;> for the username, setting the username and url as environmental variables, etc.  Neither seem to do the trick. Have also changed the shell from tcsh to bsh and have tried using "wget" instead which retrieves a 400 Error.</p>