Created
June 2, 2016 06:30
-
-
Save beepony/9c5303197f36e9c5743cb7142a862826 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'net/http' | |
image = Net::HTTP.get_response(URI.parse("http://www.site.com/file.png")).body | |
file = File.open("path-to-file.txt", "rb") | |
contents = file.read |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment