下载文件
接口说明
文件下载。
HWH5.downloadFile
请求参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
url | String | 是 | 下载资源的url |
header | String | 否 | Object HTTP请求Header |
filePath | String | 否 | 文件下载的地址,默认地址 |
返回结果
参数 | 说明 |
---|---|
status | 下载成功:1 |
请求示例
ES6版本
HWH5.downloadFile({ url: '', header: '', filePath: '' }).then(result => { console.log(result); }).catch(error => { console.log('下载异常', error); });
ES5版本
HWH5.downloadFile({ url: '', header: '', filePath: '' }).then(function (result) { console.log(result); }).catch(function (error) { console.log('下载异常', error); });