How do I download a file over HTTP using Ruby?

Viewed 18894

How do I download a file over HTTP using Ruby?

5 Answers

You can use open-uri, which is a one liner

require 'open-uri'

content = open('http://example.com').read
Related