lib/thumbtack/adapters/basic_adapter.rb
# Retrieve HTTP response from a URI
#
# @param [URI] uri
#   the uri to fetch from
# @return [Net::HTTPResponse]
#   the response
#
# @api private
# @raise [RateLimitError] if the response is rate-limited
Retrieve HTTP response from a URI
Retrieve HTTP response from a URI
def http_response(uri)
        request = Net::HTTP::Get.new(uri)
        connection(uri.host, uri.port).request(request).tap do |response|
          raise RateLimitError if response.code == TOO_MANY_REQUESTS_CODE
        end
      end
def http_response ( uri ) request = Net :: HTTP :: Get . new ( uri ) connection ( uri . host , uri . port ) . request ( request ) . tap do | response | raise RateLimitError if response . code == TOO_MANY_REQUESTS_CODE end end
Retrieve HTTP response from a URI
Retrieve HTTP response from a URI
None
Net::HTTPResponse
[RateLimitError] if the response is rate-limited
[ RateLimitError ] if the response is rate - limited
uri
<not_specific>
<not_specific>
uri the uri to fetch from
uri the uri to fetch from
api
None