When using the Faraday gem to hit a URL for an image like this:
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 the image file from the Faraday response to disk?
Debugging the response.body attribute shows it is binary data.
Any help greatly appreciated.
Why not just write the
response.bodylike any other file?