class BTCTicker::HTTPClient

Public Class Methods

get_http_response(uri) click to toggle source
# 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