D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
usr
/
share
/
doc
/
perl-HTTP-Tiny
/
eg
/
Filename :
post.pl
back
Copy
#!/usr/bin/perl use strict; use warnings; use HTTP::Tiny; use URI::Escape qw/uri_escape_utf8/; my $url = 'http://search.cpan.org/search'; my %form_data = ( query => 'DAGOLDEN', mode => 'author', ); my @params; while( my @pair = each %form_data ) { push @params, join("=", map { uri_escape_utf8($_) } @pair); } my $response = HTTP::Tiny->new->request('POST', $url, { content => join("&", @params), headers => { 'content-type' => 'application/x-www-form-urlencoded' } }); print "$response->{status} $response->{reason}\n"; print $response->{content};
Name
Size
Last Modified
Owner
Permissions
Actions
get.pl
0.386
KB
July 30 2018 7:36:01
root
0644
mirror.pl
0.383
KB
July 30 2018 7:36:01
root
0644
post.pl
0.555
KB
July 30 2018 7:36:01
root
0644
2017 © D7net | D704T team