[英]How do I follow a redirect with Test:WWW::Mechanize?
I have a form, I submit_form_ok
the form codes to /process
which returns a redirect to say /
.我有一个表单,我将表单代码submit_form_ok
到/process
返回重定向到说/
。 How can I follow the redirect to make sure it's doing the right thing?如何遵循重定向以确保它做正确的事情?
WWW::Mechanize
follows redirects automatically for you. WWW::Mechanize
会自动为您跟踪重定向。 So, unless you want to test that it sent you to /process
before it sent you to /
, you shouldn't have to care.因此,除非您想在将您发送到 / 之前测试它是否将您发送到/
/process
,否则您不必关心。 And, really, if you wind up in the right place with the right page, do you care how you got there?而且,真的,如果您以正确的页面出现在正确的位置,您是否关心您是如何到达那里的?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.