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
    

One thought on “Random Tips

Leave a Reply

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