title: how to download document using download url in liferay?
body: <p>I have developed a web service using service builder portlet, which will return a list of documents from Liferay (6.2 EE). I am returning the default document download URL like the following:</p>
  
  <pre><code>{
      ...
      "downloadUrl": "http://localhost:8080/documents/10181/12306/folder1_doc1/98188996-af04-41c8-b0b6-10b83bf17ee4"
  }
  </code></pre>
  
  <p>When the client calls the web-service he is passing user name and password in header with basic authentication.</p>
  
  <p>But when the client is trying to call the document URL with the same basic authentication Liferay returns a HTML page asking for login to access this document. How can I access the document without that login page?</p>