Random Tips

  • To use http basic authentication with open-uri:
    source = "http://secretsite.com"
    content = nil
    open(source,:http_basic_authentication=>["username" "password"]) do |s|
      content = s.read
    end
    

Comments (1)

Leave a Reply

Your email address will not be published. Required fields are marked *

*