Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Read file after download

by perlfan (Vicar)
on Jul 02, 2020 at 05:38 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11118791]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2024-04-26 03:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found