31 Aug 2010
I've recently done a proof of concept using RabbitMQ, Spring AMQP and Spring Integration. This...
21 Jul 2010
In over ten years of experience building software, there are patterns and nuances that you...
13 Jul 2010
I set out to find an elegant solution to providing growl notifications for a JRuby...
05 May 2010
I've started playing around with Heroku lately and ran into an issue when I created...
30 Apr 2010
I've been meaning to investigate something that came to mind a while back and just...

Ruby One-Liner: Download from FTP server through a proxy

Published: 21 Aug 2008

If you need to download a file or view an http page source through a proxy, something like the following one-liner will help:

require 'open-uri'
open("somefile.zip","wb").write(open("ftp://username:password@host:port/remotefile.zip", :proxy=>"http://proxyhost:proxyport").read)

blog comments powered by Disqus