mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00
fix: Http download headers
This commit is contained in:
parent
2ef017282f
commit
32c7f904db
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user