feat: fix webdav 逻辑2

This commit is contained in:
butterfly 2024-04-12 13:46:37 +08:00
parent ee15c14049
commit b72d7fbeda
1 changed files with 11 additions and 9 deletions

View File

@ -114,20 +114,22 @@ async function handle(
duplex: "half",
};
console.log("[Any Proxy]", targetUrl, {
method: req.method,
params: req.body,
});
let fetchResult;
try {
fetchResult = await fetch(targetUrl, fetchOptions);
} finally {
console.log("[Any Proxy]", targetUrl, {
status: fetchResult?.status,
statusText: fetchResult?.statusText,
});
console.log(
"[Any Proxy]",
targetUrl,
{
method: req.method,
},
{
status: fetchResult?.status,
statusText: fetchResult?.statusText,
},
);
}
return fetchResult;