A Place for my head

On Ruby, Rails, Concurrency and fiction

Posted in : | 1 comment
  • 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 Response to 'Random Tips'

Subscribe to comments with RSS or TrackBack to 'Random Tips'.

  1. Like to read your good blog, can you please provide some nice information about good internet marketing sites we could use

    ???????

    26 Apr 10 at 10:59 am

Leave a Reply