Kad Kerforn wrote: > In my app, I have an URL to download a file from a remote site , when > using this URL in a browser I download the file... > > "http://www.anotherdomain.com/resource/download/579633" > > but I need to to get the content of this file within my app , as I > must encode it and transfer to another app > > if I use this url with open-uri, I get the html page, not the file > itself......
I'm not following you. If the above link is a URI representing the file (with the appropriate content-type) then open-uri should get the file. Of course, if that URI represents an HTML page then yes, you would get an HTML page. HTTP is content agnostic. It will simple GET (or POST, PUT, DELETE, etc.) whatever the URI represents. OpenURI is just a wrapper around net/http, net/https & net/ftp: http://www.ruby-doc.org/core/classes/OpenURI.html -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

