文件下载
请求参数
|
参数 |
类型 |
必填 |
说明 |
|---|---|---|---|
|
url |
String |
是 |
下载资源的url |
|
headers |
Object |
否 |
Object HTTP请求Header |
|
filePath |
String |
是 |
文件存放到本地的地址,包含文件名称及后缀(/download/test.png) |
返回结果
|
参数 |
说明 |
|---|---|
|
status |
下载成功:1 |
请求示例
- ES6版本
HWH5.downloadFileVPN({ url: '', headers: {}, filePath: '' }).then(result => { console.log(result); }).catch(error => { console.log('下载异常', error); });
- ES5版本
HWH5.downloadFileVPN({ url: '', headers: {}, filePath: '' }).then(function (result) { console.log(result); }).catch(function (error) { console.log('下载异常', error); });