perl post 请求相关参数

    $ua->post( $url, \%form )
$ua->post( $url, \@form )
$ua->post( $url, \%form, $field_name => $value, ... )
$ua->post( $url, $field_name => $value,... Content => \%form )
$ua->post( $url, $field_name => $value,... Content => \@form )
$ua->post( $url, $field_name => $value,... Content => $content )
This method will dispatch a "POST" request on the given $url, with
%form or @form providing the key/value pairs for the fill-in form
content. Additional headers and content options are the same as for
the get() method. 这个方法会调用一个POST 请求在给定的$url上,使用%form 或者@form 提供键值对 对于填充内容, 额外的 headers 和内存选项是和get()方法一样
第一个参数是登陆的地址,第二个参数是一个匿名hash,第三个参数是请求头
my $url='https://wenjinbao.winfae.com/business/dispatch_post.do?action=submitAdminLogin';
my $res = $ua->post($url,{
'userName'=>'IT_public',
#'userName'=>'ITxxxx',
'userPass'=>'xxx',
'userPass1'=>'xx',
'validCode'=> "$validCode"
},
'User-Agent'=>'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0',
'Host'=>'wenjinbao.winfae.com',
'Referer'=>'https://wenjinbao.winfae.com/backoffice/login.html' );
上一篇:单例模式C#


下一篇:Admob(6.12.x)符号未定义错误的解决方法(IOS)