Created
May 10, 2012 17:47
-
-
Save kenmazaika/2654711 to your computer and use it in GitHub Desktop.
connection.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ActiveResource::Connection | |
| # Creates new Net::HTTP instance for communication with | |
| # remote service and resources. | |
| def http | |
| http = Net::HTTP.new(@site.host, @site.port) | |
| http.use_ssl = @site.is_a?(URI::HTTPS) | |
| http.verify_mode = OpenSSL::SSL::VERIFY_NONE | |
| http.read_timeout = @timeout if @timeout | |
| #Here's the addition that allows you to see the output | |
| http.set_debug_output $stderr | |
| return http | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment