Module: Webmaster::Api::Connection
Constant Summary collapse
- USER_AGENT =
'User-Agent'.freeze
- ACCEPT =
'Accept'.freeze
- ACCEPT_CHARSET =
'Accept-Charset'.freeze
- CONTENT_TYPE =
'Content-Type'.freeze
- ALLOWED_OPTIONS =
[ :headers, :url, :params, :request, :ssl ].freeze
Instance Method Summary collapse
-
#connection(options = {}) ⇒ Object
Returns a Fraday::Connection object.
Instance Method Details
#connection(options = {}) ⇒ Object
Returns a Fraday::Connection object
28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/webmaster/api/connection.rb', line 28 def connection( = {}) = self.() if @connection_options != @connection = nil @connection_options = end @connection ||= Faraday.new(@connection_options.merge(:builder => self.stack)) end |