my $url='https://www.zjcap.cn/business/dispatch_post.do?action=submitAdminLogin';
my $res = $ua->post($url,{
'userName'=>'xxx',
'userPass'=>'3xxx8599e549ff',
'userPass1'=>'xxx56',
'validCode'=> "$validCode"
},
'User-Agent'=>'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0',
'Host'=>'www.zjcap.cn',
'Referer'=>'https://www.zjcap.cn/backoffice/login.html'
);
print "---------------
";
#my $head =$res->header('Location');
print $res->header('Location');
print "
";
print $res->status_line."
";
print $res->as_string();#获取的是原始内容,包括响应头,响应正文