On 04/05/17 13:04, Nagy, Attila wrote:
Hi,

I would like to copy a file between two HTTP servers in the most efficient manner, which probably means a streaming down/upload (GET/PUT) with the producer/consumer scheme.

Can this be done easily, could somebody write a simple example?

I guess it'll look something like this:

https://gist.github.com/philmayers/692d04c15a71d3905e075b30f0543f23

Only lightly tested, but seems to work. There's a lot of debugging print statements in the above code which can obviously be discarded or turned into logging statements in production use.

_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to