module Lifen class Client private def faraday_client @faraday_client ||= Faraday.new(faraday_options) do |faraday| faraday.request :url_encoded # form-encode POST params faraday.adapter Faraday.default_adapter # make requests with Net::HTTP end end def faraday_options options = {url: site} options[:proxy] = proxy_url if !proxy_url.nil? options end def site Lifen.configuration.site end def proxy_url Lifen.configuration.proxy_url end end end