Sha256: e0eec3c3b1334f2129abf735c89f54cdaba78e1cff5ca21fadf936e2b1d73dbb

Contents?: true

Size: 537 Bytes

Versions: 2

Compression:

Stored size: 537 Bytes

Contents

require 'faraday_middleware'

module Marvel
  module Connection
    private

    def connection
      options = {
        ssl: { verify: false },
        url: 'https://gateway.marvel.com/v1/public/'
      }

      Faraday.new(options) do |connection|
        connection.use Faraday::Request::UrlEncoded
        connection.use Faraday::Response::RaiseError
        connection.use Faraday::Response::Mashify
        connection.use Faraday::Response::ParseJson
        connection.adapter(Faraday.default_adapter)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
marvel_api-0.2.0 lib/marvel/connection.rb
marvel_api-0.1.3 lib/marvel/connection.rb