Thread Installation von LWP::Parallel::UserAgent
(14 answers)
Opened by bianca at 2016-01-11 10:49
Bekomme leider ein "401 Authorization Required" vom Server.
Schaut mal bitte, ob meine Syntax korrekt ist, denn Passwort ist korrekt und AuthType Basic ist ebenfalls korrekt. Es kann also nur an meiner Syntax liegen. Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 my $h = HTTP::Headers->new; $h->authorization_basic('user','passwort_im_klartext'); my $request = HTTP::Request->new( 'GET', 'http://www. ... .de/script', $h, ); my $id1 = $async->add($request); my $id2 = $async->add( HTTP::Request->new(GET => 'http://www. ... .de')); while ( my ( $response, $id ) = $async->wait_for_next_response ) { say $id.' liefert '.length($response->decoded_content)." Byte: '".$response->decoded_content."'"; } 10 print "Hallo"
20 goto 10 |