Commit b43771c2 authored by Sergey Gernyak's avatar Sergey Gernyak

Small refactor

parent a941d00b
......@@ -6,10 +6,10 @@ module BetfairApiNgRails
include Api::Constants
def provider_requester(api_url, ssoid = nil)
req = create_http_requester(api_url)
req.set_request_headers API_REQUEST_HEADERS
req.set_auth_headers Api::Config.application_key, ssoid
req
create_http_requester(api_url).tap do |req|
req.set_request_headers API_REQUEST_HEADERS
req.set_auth_headers Api::Config.application_key, ssoid
end
end
def session_requester
......
......@@ -27,7 +27,7 @@ module BetfairApiNgRails
end
def http_requester(api_url)
@_http_requester ||= Api::Http::Factory.provider_requester api_url, ssoid
Api::Http::Factory.provider_requester api_url, ssoid
end
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment