Class: BTCTicker::HTTPClient
- Inherits:
-
Object
- Object
- BTCTicker::HTTPClient
- Defined in:
- lib/btc_ticker/http_client.rb
Class Method Summary collapse
Class Method Details
.get_http_response(uri) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/btc_ticker/http_client.rb', line 5 def self.get_http_response(uri) begin response = RestClient.get(uri, :user_agent => 'ruby-btc_ticker') rescue RestClient::ExceptionWithResponse => err raise Errors::HTTPError, "#{err.http_code}" else response end end |