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

Re: Read file after download

by perlfan (Priest)
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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2020-08-14 08:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which rocket would you take to Mars?










    Results (75 votes). Check out past polls.

    Notices?