kernelsmith
10/15/2014 - 8:03 PM

download_file_over_http.rb

require 'net/http'
# Must be somedomain.net instead of somedomain.net/, otherwise, it will throw exception.
Net::HTTP.start("somedomain.net") do |http|
    resp = http.get("/blah.zip")
    open("blah.zip", "wb") do |file|
        file.write(resp.body)
    end
end