You are here: Forums Ask a Rails expert how to get the stat code from ...
Posted in Forums : Ask a Rails expert
Authority 0
Posting Rating 16
Sign in to rate this post
|
My code is as follows
client = HTTPClient.new
response= client.get(‘http://localhost:3000/’) My requirement is to read the @response_status_code from the above header .Please give me some idea about this. |
Authority 12
Posting Rating 96
Sign in to rate this post
|
Hi, client = HTTPClient.new => [...] response = client.get “http://google.com” => [...] response.status => 301 response.reason => “Moved Permanently” Jon |
Authority 0
Posting Rating 16
Sign in to rate this post
|
i gan get it by” response.response_status_code” |
Authority 12
Posting Rating 96
Sign in to rate this post
|
Don’t know which HTTPClient you’re using, but the version I have doesn’t have a response_status_code method. It’s definitely just response.status.
|
Authority 12
Posting Rating 95
Sign in to rate this post
|
I am not able to install the httpclient gem, is there any other source from where i can get it? gem install httpclient |
Authority 0
Posting Rating 16
Sign in to rate this post
|
hi , just down load httpclient and put it in application folder.and then install it from command prompt.make sure your ruby gem version and ruby is 1.8.5 more than that.or else check which httpclient is suitable for your application.from the ruby forge site. |
Ask a Rails expert : Sanitizing html
Ask a Rails expert : First post, requesting sage perspective
Ask a Rails expert : How to use mephisto
Ask a Rails expert : How to use mephisto
Ask a Rails expert : will_paginate customization problem
Ask a Rails expert : BackgroundRB still wants 'development' environment...?
Ask a Rails expert : activescaffold, sql exception
Ask a Rails expert : Passing non-english chars in query string
Ask a Rails expert : Rails and 2D barcodes
Ask a Rails expert : apache giving proxy error