From: Kassym Dorsel Date: 2011-09-25T03:38:23+09:00 Subject: net::http does not return what a browser returns Hello, I trying to access an API with ruby, but I can't get net::http to get me the response. Here is the code : http.start do |session| response = session.get('/__GetChallenge') result = Digest::SHA1.hexdigest response.body + password.upcase result2 = session.get("/login?Plugin=BFAPI&Templates=Session&Challenge=# {response.body}&UserID=#{user}&SHA1=#{result}",{'Cookie' => response['Set-Cookie']}) end Now if I send these via a browser (chrome) result2 comes out with a string, although in here result2 has a body of length 0. The initial response works fine. Any ideas? Thanks. -- Posted via http://www.ruby-forum.com/.