Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: Read file after download

by perlfan (Vicar)
on Jul 02, 2020 at 05:38 UTC ( #11118791=note: print w/replies, xml ) Need Help??

in reply to Read file after download

I recommend using HTTP::Tiny's mirror method. LWP::Simple also has  getstore.

You'll want to check the status of the response to determine if it was fully saved. You can also get the expected length of the file in the headers and check that when the download finishes without error. Some sort of verification of the file downloaded is always a good idea, however you do it.

I don't know how either module deals with chunked content. This won't matter unless you're pulling from and endpoint that may potentially chunk the responses.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2020-11-25 02:28 GMT
Find Nodes?
    Voting Booth?

    No recent polls found