feat: 拉取文件时 日志输出 User-Agent; 脚本上下文参数 $options 中新增 _req 字段, 包含请求信息

This commit is contained in:
xream
2025-04-08 12:47:02 +08:00
parent e4e0c7e69c
commit 082b0a56ad
4 changed files with 46 additions and 6 deletions

View File

@@ -40,6 +40,16 @@ function operator(proxies = [], targetPlatform, context) {
// 先这样处理 encodeURIComponent('arg1=a&arg2=b')
// /api/file/foo?$options=arg1%3Da%26arg2%3Db
// 默认会带上 _req 字段, 结构为
// {
// method,
// url,
// path,
// query,
// params,
// headers,
// body,
// }
// console.log($options)
// targetPlatform 为输出的目标平台