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

Re: Stream file from one HTTP server to another with HTTP GET and PUT requests

by thewebsi (Scribe)
on Nov 16, 2012 at 06:00 UTC ( #1004135=note: print w/replies, xml ) Need Help??


in reply to Stream file from one HTTP server to another with HTTP GET and PUT requests

LWP's request() method accepts a callback option that does exactly this. You would do a GET and a PUT both with callbacks that read and write the data in chunks.

A GET example is provided in the LWP Cookbook, and PUT examples can be found on PerlMonks here and here.

This method does require a fork() (like the command-line counterpart). To do it without one, use Net::HTTP for the PUT.

  • Comment on Re: Stream file from one HTTP server to another with HTTP GET and PUT requests

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1004135]
help
Chatterbox?
[Lady_Aleena]: Maybe...
[talexb]: Sounds like a Try It And See question to me ..
[1nickt]: heh, I hab\ve been. Trying to understand it.
[1nickt]: perl -e 'print 1.0' ... output '1'.
[Lady_Aleena]: You could quote it. <c>perl -e 'print "1.0"'>/c> returns 1.0

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (13)
As of 2017-05-24 18:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?