How to POST content with an HTTP Request (Perl)

前端 未结 2 541
旧巷少年郎
旧巷少年郎 2021-02-08 03:53
use LWP::UserAgent;
use Data::Dumper;

my $ua = new LWP::UserAgent;
$ua->agent(\"AgentName/0.1 \" . $ua->agent);
my $req = new HTTP::Request POST => \'http://ex         


        
2条回答
  •  情歌与酒
    2021-02-08 04:46

    my $ua      = LWP::UserAgent->new(); 
    my $request = POST( $url, [ 'port' => 8, 'target' => 64 ] ); 
    my $content = $ua->request($request)->as_string(); 
    

提交回复
热议问题