From: Gene Tani Date: 2005-12-07T23:22:35+09:00 Subject: Re: Switch User Agent Alex Amat wrote: > Hi all I'm writing an application in ruby and I need to change the > UAProof of an HTTP request that I'm sending out. (To pretend that my > browser is a mobile phone) does anyone know how to go about it. > > Many thanks > > -- > Posted via http://www.ruby-forum.com/. I haven't seent the term UAproof before, but the open-uri and Net::HTTP ways of opening URLs are both dict-like as far as passing User-Agents etc: http://www.ruby-doc.org/stdlib/libdoc/open-uri/rdoc/ e.g. Net::HTTP.start( 'www.digg.com', 80 ) do |http| print( http.get( '/', "User-Agent" => "foobar" ).body ) ; end setting referrer/referer (can't remember which is correct!) is similar