Skip to content

Instantly share code, notes, and snippets.

/ruby.rb Secret

Created June 28, 2015 23:37
Show Gist options
  • Save anonymous/91241725f6ed98800e8e to your computer and use it in GitHub Desktop.
Save anonymous/91241725f6ed98800e8e to your computer and use it in GitHub Desktop.
require 'net/http'
# Must be somedomain.net instead of somedomain.net/, otherwise, it will throw exception.
Net::HTTP.start("somedomain.net") do |http|
resp = http.get("/flv/sample/sample.flv")
open("sample.flv", "wb") do |file|
file.write(resp.body)
end
end
puts "Done."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment