Sha256: ab2e54ceb3665c356353970f7205bf4fdd15571b49c680383e0bf35e116c6e22

Contents?: true

Size: 459 Bytes

Versions: 16

Compression:

Stored size: 459 Bytes

Contents

require 'faraday'

# Exactly like Basic, but uses JSON encoding for request body
# if applicable
module ApiClient
  module Connection
    class Json < Basic
      def finalize_handler
        @handler.use     Middlewares::Request::Logger, ApiClient.logger if ApiClient.logger
        @handler.use     Middlewares::Request::Json
        @handler.use     Faraday::Request::UrlEncoded
        @handler.adapter Faraday.default_adapter
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
api_client-0.5.11 lib/api_client/connection/json.rb
api_client-0.5.9 lib/api_client/connection/json.rb
api_client-0.5.7 lib/api_client/connection/json.rb
api_client-0.5.6 lib/api_client/connection/json.rb
api_client-0.5.5 lib/api_client/connection/json.rb
api_client-0.5.4 lib/api_client/connection/json.rb
api_client-0.5.3 lib/api_client/connection/json.rb
api_client-0.5.2 lib/api_client/connection/json.rb
api_client-0.5.1 lib/api_client/connection/json.rb
api_client-0.5.0 lib/api_client/connection/json.rb
api_client-0.4.3 lib/api_client/connection/json.rb
api_client-0.4.2 lib/api_client/connection/json.rb
api_client-0.4.1 lib/api_client/connection/json.rb
api_client-0.3.3 lib/api_client/connection/json.rb
api_client-0.4.0 lib/api_client/connection/json.rb
api_client-0.3.2 lib/api_client/connection/json.rb