Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: LWP::Simple not getting content

by jonnyfolk (Vicar)
on Jul 26, 2018 at 16:11 UTC ( [id://1219323]=note: print w/replies, xml ) Need Help??


in reply to Re: LWP::Simple not getting content
in thread LWP::Simple not getting content

Thanks for your reply. I switched over to LWP::UserAgent and successfully used the following code

my $url = 'https://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.x +ml?025a000c2e476c719095c900b9c8b5e4'; my $ua = LWP::UserAgent->new( ssl_opts => { SSL_verify_mode => 'SSL_VERIFY_NONE'}, ); $ua->agent('Mozilla/4.0 (compatible; MSIE 5.12; Mac_PowerPC)' ); my $response = $ua->get($url); if ($response->is_success) { print $response->decoded_content; # or whatever } else { die $response->status_line; }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1219323]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2024-04-25 22:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found