diff --git a/www/public-interface.js b/www/public-interface.js index 7b32ddb..66b5261 100644 --- a/www/public-interface.js +++ b/www/public-interface.js @@ -181,12 +181,15 @@ module.exports = function init(exec, cookieHandler, urlUtil, helpers, globalConf case 'upload': var fileOptions = helpers.checkUploadFileOptions(options.filePath, options.name); exec(onSuccess, onFail, 'CordovaHttpPlugin', 'uploadFiles', [url, headers, fileOptions.filePaths, fileOptions.names, options.connectTimeout, options.readTimeout, options.followRedirect, options.responseType, reqId]); + break; case 'download': var filePath = helpers.checkDownloadFilePath(options.filePath); var onDownloadSuccess = helpers.injectCookieHandler(url, helpers.injectFileEntryHandler(success)); exec(onDownloadSuccess, onFail, 'CordovaHttpPlugin', 'downloadFile', [url, headers, filePath, options.connectTimeout, options.readTimeout, options.followRedirect, reqId]); + break; default: exec(onSuccess, onFail, 'CordovaHttpPlugin', options.method, [url, headers, options.connectTimeout, options.readTimeout, options.followRedirect, options.responseType, reqId]); + break; } return reqId;