开发者

How do I follow a redirect with Test:WWW::Mechanize?

开发者 https://www.devze.com 2023-03-20 14:32 出处:网络
I have a开发者_如何学Python form, I submit_form_ok the form codes to /process which returns a redirect to say /. How can I follow the redirect to make sure it\'s doing the right thing?WWW::Mechanize f

I have a开发者_如何学Python form, I submit_form_ok the form codes to /process which returns a redirect to say /. How can I follow the redirect to make sure it's doing the right thing?


WWW::Mechanize follows redirects automatically for you. So, unless you want to test that it sent you to /process before it sent you to /, you shouldn't have to care. And, really, if you wind up in the right place with the right page, do you care how you got there?

0

精彩评论

暂无评论...
验证码 换一张
取 消