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

如何使用浏览器发送GET/POST请求 #767

Closed
nildebug opened this issue Nov 27, 2022 · 2 comments
Closed

如何使用浏览器发送GET/POST请求 #767

nildebug opened this issue Nov 27, 2022 · 2 comments
Labels
question Questions related to rod

Comments

@nildebug
Copy link

nildebug commented Nov 27, 2022

Rod Version: v0.112.0
Chrome Version:版本 107.0.1418.56 (正式版本) (64 位)
如何使用浏览器发送GET/POST请求,只能使用ROD执行JS发送请求吗?

@nildebug nildebug added the question Questions related to rod label Nov 27, 2022
@nildebug nildebug changed the title 如果使用浏览器发送GET/POST请求 如何使用浏览器发送GET/POST请求 Nov 27, 2022
@nildebug
Copy link
Author

result:=Page.Eval(()=>{
var xhr = new XMLHttpRequest();
xhr.open("GET","https://www.google.com",false);
xhr.setRequestHeader("accept","application/json, text/plain, */*");
return xhr.response;
})

result 返回"" ?

@ysmood
Copy link
Collaborator

ysmood commented Nov 27, 2022

对,用 js 发请求,请看文档学习如何获取 js 的返回值

#322

@ysmood ysmood closed this as completed Nov 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Questions related to rod
Projects
None yet
Development

No branches or pull requests

2 participants