Thread Problem mit SSL-Verbindung (8 answers)
Opened by Gast at 2005-11-15 00:25

esskar
 2005-11-15 12:53
#60172 #60172
User since
2003-08-04
7321 Artikel
ModeratorIn

user image
beispiel:

Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
 Create a user agent object
use LWP::UserAgent;
$ua = LWP::UserAgent->new;
$ua->agent("MyApp/0.1 ");

# Create a request
my $req = HTTP::Request->new(POST => 'http://search.cpan.org/search');
$req->content_type('application/x-www-form-urlencoded');
$req->content('query=libwww-perl&mode=dist');

# Pass request to the user agent and get a response back
my $res = $ua->request($req);

# Check the outcome of the response
if ($res->is_success) {
print $res->content;
}
else {
print $res->status_line, "\n";
}

View full thread Problem mit SSL-Verbindung