Advertisement
Guest User

Untitled

a guest
Jun 28th, 2015
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.29 KB | None | 0 0
  1. require 'net/http'
  2. # Must be somedomain.net instead of somedomain.net/, otherwise, it will throw exception.
  3. Net::HTTP.start("somedomain.net") do |http|
  4.     resp = http.get("/flv/sample/sample.flv")
  5.     open("sample.flv", "wb") do |file|
  6.         file.write(resp.body)
  7.     end
  8. end
  9. puts "Done."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement