qordova-http

1.0.1 • Public • Published

qordova-http

A Q-enabled HTTP for Cordova. Easier to use than cordova-plugin-file-transfer.

Installation

cordova plugin add cordova-plugin-file-transfer

npm install quordova-file

Usage

download(url, dst_fname)

Download a file to a destination file name.

// Note that we must wrap inside `deviceready` because it uses Cordova features.
document.addEventListener("deviceready", (function() {
  Http.download(url, dst\_fname)
  .then(function() {
    console.log('file downloaded');
  })
  .fail(function(HttpError) {
    console.log('file could not be downloaded');
  });
});

Readme

Keywords

none

Package Sidebar

Install

npm i qordova-http

Weekly Downloads

1

Version

1.0.1

License

MIT

Last publish

Collaborators

  • benallfree