lib/get_response/request.rb in get_response-0.1.0 vs lib/get_response/request.rb in get_response-0.1.1
- old
+ new
@@ -25,10 +25,15 @@
def connection
@connection ||= Faraday.new(url: api_endpoint) do |faraday|
faraday.request :url_encoded
faraday.adapter Faraday.default_adapter
+ faraday.response :logger, GetResponse.config.logger if verbose?
end
+ end
+
+ def verbose?
+ GetResponse.config.verbose
end
def api_endpoint
GetResponse.config.api_endpoint || DEFAULT_API_ENDPOINT
end