When using the Faraday gem, hit the URL for the image as follows:
http_conn = Faraday.new do |builder| builder.adapter Faraday.default_adapter end response = http_conn.get 'http://example.tld/image.png'
How can you write an image file from Faraday's answer to disk?
Debugging the response.body attribute shows that this is binary data.
Any help is greatly appreciated.
ruby file io binary download
Eliot sykes
source share