Thread basic authentifizierung am server (5 answers)
Opened by turbo at 2011-11-30 14:48

GwenDragon
 2011-11-30 15:25
#154562 #154562
User since
2005-01-17
14754 Artikel
Admin1
[Homepage]
user image
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

View full thread basic authentifizierung am server