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.
Arnon Weinberg
Back2Front - The Web Site People
Back2Front - The Web Site People
|
---|
In Section
Seekers of Perl Wisdom