I receive status code when I paste url in browser, but when I
try to do
status = Net::HTTP.get_response(URI.parse("https://mysite.chargevault.com/status?key=key&code=code")).body
I receive this error:
Net::HTTPBadResponse: wrong status line: "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">"
/usr/ruby1.9.2/lib/ruby/1.9.1/net/http.rb:2221:in `read_status_line'
/usr/ruby1.9.2/lib/ruby/1.9.1/net/http.rb:2208:in `read_new'
/usr/ruby1.9.2/lib/ruby/1.9.1/net/http.rb:1191:in `transport_request'
/usr/ruby1.9.2/lib/ruby/1.9.1/net/http.rb:1177:in `request'

#1 Posted by Marc Guyer Support staff on 19 May, 2011 02:48 PM
Hi Ildar -- Can you tell what the raw response is?
#2 Posted by Marc Guyer Support staff on 19 May, 2011 04:25 PM
I guess that bit of code was untested. It turns out to be much more involved because of the ssl:
#3 Posted by ildar.abdulin on 20 May, 2011 01:22 AM
Problem solved,
Thank you!
Marc Guyer closed this discussion on 20 May, 2011 03:27 PM.