app/services/medical_copays/request.rb
def connection
      Faraday.new(url: url, headers: headers) do |conn|
        conn.request :json
        conn.use :breakers
        conn.use Faraday::Response::RaiseError
        conn.response :raise_error, error_prefix: service_name
        conn.response :json
        conn.response :betamocks if mock_enabled?
        conn.adapter Faraday.default_adapter
      end
    end
##
# Create a connection object that manages the attributes
# and the middleware stack for making our HTTP requests to VBS
#
# @return [Faraday::Connection]
#
Create a connection object that manages the attributes
and the middleware stack for making our HTTP requests to VBS
Create a connection object that manages the attributes and the middleware stack for making our HTTP requests to VBS
def connection
      Faraday.new(url: url, headers: headers) do |conn|
        conn.request :json
        conn.use :breakers
        conn.use Faraday::Response::RaiseError
        conn.response :raise_error, error_prefix: service_name
        conn.response :json
        conn.response :betamocks if mock_enabled?
        conn.adapter Faraday.default_adapter
      end
    end
def connection Faraday . new ( url : url , headers : headers ) do | conn | conn . request :json conn . use :breakers conn . use Faraday :: Response :: RaiseError conn . response :raise_error , error_prefix : service_name conn . response :json conn . response :betamocks if mock_enabled? conn . adapter Faraday . default_adapter end end
Create a connection object that manages the attributes
and the middleware stack for making our HTTP requests to VBS
Create a connection object that manages the attributes and the middleware stack for making our HTTP requests to VBS
None
Faraday::Connection