Commit b43771c2 authored by Sergey Gernyak's avatar Sergey Gernyak

Small refactor

parent a941d00b
...@@ -6,10 +6,10 @@ module BetfairApiNgRails ...@@ -6,10 +6,10 @@ module BetfairApiNgRails
include Api::Constants include Api::Constants
def provider_requester(api_url, ssoid = nil) def provider_requester(api_url, ssoid = nil)
req = create_http_requester(api_url) create_http_requester(api_url).tap do |req|
req.set_request_headers API_REQUEST_HEADERS req.set_request_headers API_REQUEST_HEADERS
req.set_auth_headers Api::Config.application_key, ssoid req.set_auth_headers Api::Config.application_key, ssoid
req end
end end
def session_requester def session_requester
......
...@@ -27,7 +27,7 @@ module BetfairApiNgRails ...@@ -27,7 +27,7 @@ module BetfairApiNgRails
end end
def http_requester(api_url) 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 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