有验证码的登录页,http工具类怎么登陆呢
4 回复
给个思路
String url = "地址";
Request req = Request.get(url);
Response resp = Sender.create(req).send();
Cookie cookie = resp.getCookie();
req = Request.post("表单地址");
req.setParams(...);
req.setCookie(cookie);
resp = Sender.create(req).send();
带cookie访问 http://218.205.184.123:7070/admin/getKaptchaImage.html 就是验证码
添加回复
请先登陆