perl6 HTTP::UserAgent发送post

use HTTP::UserAgent;
my $ua = HTTP::UserAgent.new;
say 'All method:';
say $ua.^methods;
my %data = :cmd('whoami');
my $result = $ua.post('http://localhost/1.php', %data);
say $result.content;

 

posted on 2017-05-27 03:04  Perl6  阅读(247)  评论(0编辑  收藏  举报

导航