Module: RubyLokaliseApi::Connection
- Included in:
- Request
- Defined in:
- lib/ruby_lokalise_api/connection.rb
Overview
Module to setup connection using Faraday
Instance Method Summary collapse
-
#connection(endpoint, params = {}) ⇒ Faraday::Connection
Creates a new Faraday object with specified params.
Instance Method Details
#connection(endpoint, params = {}) ⇒ Faraday::Connection
Creates a new Faraday object with specified params
11 12 13 14 15 16 |
# File 'lib/ruby_lokalise_api/connection.rb', line 11 def connection(endpoint, params = {}) Faraday.new((endpoint, params), request_params_for(endpoint.client)) do |faraday| faraday.adapter Faraday.default_adapter faraday.request :gzip end end |