Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: LWP::Simple not getting content

by jonnyfolk (Vicar)
on Jul 26, 2018 at 16:11 UTC ( #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? | Other CB clients
Other Users?
Others pondering the Monastery: (1)
As of 2021-09-26 13:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?