title: Cordova file-transfer plugin download always yields http status 401 and error code 3
body: <p>I'm using Ionic to build an app for Android, and when testing from a device, the call I make using the <code>org.apache.cordova.file-transfer</code> plugin always yields the same response.</p>
  
  <p>Here's the code used to fire off the download:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>    $scope.getFile = function(){
        var filePath = cordova.file.dataDirectory + "beer.json";
        var uri = encodeURI('https://stormy-sierra-8448.herokuapp.com/api/?q=stones+pale+ale');
        var options = {};
        $cordovaFileTransfer.download(uri, filePath, options, true)
          .then(function(result) {
            $scope.status = result;
            alert('success');
          }, function(err) {
            console.log(err);
          }, function (progress) {
            $timeout(function () {
              $scope.downloadProgress = (progress.loaded / progress.total) * 100;
            })
          });
      }</code></pre>
  </div>
  </div>
  </p>
  
  <p>And then the response (from the console)</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>FileTransferError {
    code: 3,
    source: "https://stormy-sierra-8448.herokuapp.com/api/?q=stones+pale+ale",
    target: "documents/beer.txt",
    http_status: 401,
    body: null…
  }
  body: nullcode: 3exception: nullhttp_status: 401source: "https://stormy-sierra-8448.herokuapp.com/api/?q=stones+pale+ale"
  target: "documents/beer.txt"
  __proto__: FileTransferError</code></pre>
  </div>
  </div>
  </p>
  
  <p>My environment looks like this:
  Cordova v5.0.0
  Ionic 1.3.20</p>
  
  <p>I've seen others post that downgrading the plugin made it work, but when I go below the current version I'm using (0.5), the app doesn't build. When I use the newest version (1.0), the app builds, but after it launches, the console says:</p>
  
  <p><code>Uncaught module cordova-plugin-file.ProgressEvent not found - cordova.js:59</code></p>
  
  <p>The device has a connection and verified with the 'device' plugin.</p>
  
  <p>Please help!</p>