fix: Http download headers

This commit is contained in:
linyuchen 2024-05-15 22:44:15 +08:00
parent 2ef017282f
commit 32c7f904db

View File

@ -109,7 +109,7 @@ export async function httpDownload(options: string | HttpDownloadOptions): Promi
}
}
}
const fetchRes = await net.fetch(url, headers)
const fetchRes = await net.fetch(url, {headers})
if (!fetchRes.ok) throw new Error(`下载文件失败: ${fetchRes.statusText}`)
const blob = await fetchRes.blob()