try fix url construct

This commit is contained in:
2025-03-18 20:48:14 +08:00
parent 1b6ec67ba8
commit a4a45bba1c
2 changed files with 3 additions and 3 deletions

View File

@@ -43,7 +43,7 @@ async function QueryPostAPIWithParamsInternal<T>(
) {
let url: URL
try {
url = new URL(urlString)
url = new URL(urlString.toString())
} catch (e) {
console.error('尝试解析API地址失败: ' + urlString, e)
return {
@@ -97,7 +97,7 @@ async function QueryGetAPIInternal<T>(
try {
let url: URL
try {
url = new URL(urlString)
url = new URL(urlString.toString())
} catch (e) {
console.error('尝试解析API地址失败: ' + urlString, e)
return {