Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug:接口调试中,前执行脚本部分功能异常 #2319

Open
windsaygo opened this issue Feb 12, 2025 · 1 comment
Open

bug:接口调试中,前执行脚本部分功能异常 #2319

windsaygo opened this issue Feb 12, 2025 · 1 comment

Comments

@windsaygo
Copy link

1 在前执行脚本中,通过 runapi.setHeader("cookie") 无法生效
2 在body中存在的参数,在前执行脚本,通过 runapi.getParam("name") 无法生效

Image

Image

@star7th
Copy link
Owner

star7th commented Feb 12, 2025

1,目前确实没有内置 设置cookies 的方法 。其实不用把cookie写进来。服务端只需要像浏览器那样写入浏览器本地即可。下次请求应该会自动带上的。
2,getParam 不能用于参数为json的情况。参数为json的话,你应该 runapi.getParamJson() // 获取请求参数为json的json对象

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants