Method: RoadForest::HTTP::UserAgent#make_request

Defined in:
lib/roadforest/http/user-agent.rb

#make_request(method, url, headers = nil, body = nil, retry_limit = 5) ⇒ Object



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/roadforest/http/user-agent.rb', line 18

def make_request(method, url, headers = nil, body=nil, retry_limit=5)
  headers ||= {}

  method = method.to_s.upcase

  validate(method, url, headers, body)

  request = setup_request(method, url, headers, body)

  response = send_request(request, retry_limit)

  cache_response(url, response)

  return response
end