From: Idealone Ideally Date: 2009-04-07T17:48:36+09:00 Subject: Downloading a file using ruby Hi All, I want to download a file from my web application using/calling ruby code. Manually i can download reports by clicking on 'DOWNLOAD' button in my app, which in turn gets the file from servlet path(where the files are stored). My question is, how can i automate this download part in ruby, if its feasible. During my googling, i found a set of ruby code to download pictures from a site. snippet of the code looks like this: require 'net/http' Net::HTTP.start("static.test.com") { |http| resp = http.get("/92/2134322cedc5fef7_o.jpg") open("fun.jpg", "wb") { |file| file.write(resp.body) } } Please let me know if i could use similar technique to download a file(excel file). Thanks I -- Posted via http://www.ruby-forum.com/.