Thread basic authentifizierung am server
(5 answers)
Opened by turbo at 2011-11-30 14:48
Beispiel:
Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 use strict; use warnings; use LWP::UserAgent; use HTTP::Request; my $ua = LWP::UserAgent->new; my $req = HTTP::Request->new(GET => 'http://example.org/blah.txt'); # URL $req->authorization_basic('Ruuut', 'abcdefg1234566'); # Nutzername , Passwort my $response = $ua->request($req, 'datei.txt'); # abholen und in Datei speichern |