views:

52

answers:

1

I opened a question how can I capture response from twitter.com? ( ruby + twitter gem) to know if my update was successful. It is working fine...

But I would like to know how I can capture HTTP Response Codes and Errors inside my ruby code?

oauth = Twitter::OAuth.new('consumer token', 'consumer secret')
oauth.authorize_from_access('access token', 'access secret')

client = Twitter::Base.new(oauth)
response = client.update('Heeeyyyyoooo from Twitter Gem!')
A: 

If you use firefox with the firebug addon installed, it displays http response codes on it's "NET" tab.

Or do you need to do this from within your app?

Jon Cage
yes, I need it inside my ruby code.
Radek