title: cURL download files issue
body: <p>When i give the URL (<code>http://192.168.150.41:8080/filereport/31779/json/</code>)  in browser, It automatically downloads the file as <code>31779_report.json</code>. </p>
  
  <p>Now using i'm trying to download the file using <code>curl</code> but i get the following error. </p>
  
  <pre><code>$ curl -O http://192.168.150.41:8080/filereport/31779/json/
  curl: Remote file name has no length!
  curl: try 'curl --help' or 'curl --manual' for more information
  </code></pre>
  
  <p>When using the '<code>-L</code>' switch , I get the JSON content displayed but the file is not saved.</p>
  
  <pre><code>$curl -L http://192.168.150.41:8080/filereport/31779/json/
  
  {
  
  .....
  .....
  
  }
  </code></pre>
  
  <p>How to download the exact file "<code>31779_report.json</code>" using cURL / wget ? </p>
  
  <p>I don't want the contents to be redirected (<code>&gt;</code>) manually to a file (<code>31779_report.json</code>).</p>
  
  <p>Any suggestions please ? </p>