Sha256: c6cea52242dbf46fc0d1e3ca75cd990b564d5188e5692799bf734f4b14d83146

Contents?: true

Size: 434 Bytes

Versions: 1

Compression:

Stored size: 434 Bytes

Contents

require 'faraday_middleware'

module HN
  module Connection

    private

    def connection
      options = {
        headers: headers,
        ssl:     { verify: false },
        url:     api_url
      }

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hn_api-0.0.2 lib/hn/connection.rb