Sha256: ce18beec84e31d1498d988be3583590da50b93e80a3784d9fe1dbf3fbf886515

Contents?: true

Size: 526 Bytes

Versions: 19

Compression:

Stored size: 526 Bytes

Contents

# frozen_string_literal: true

module AtlasRb
  module FaradayHelper
    def connection(params)
      Faraday.new(
        url: ENV.fetch("ATLAS_URL", nil),
        params: params,
        headers: { "Content-Type" => "application/json" }
      ) do |f|
        f.response :follow_redirects
        f.adapter Faraday.default_adapter
      end
    end

    def multipart(_params)
      Faraday.new(url: ENV.fetch("ATLAS_URL", nil)) do |f|
        f.request :multipart
        f.request :url_encoded
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
atlas_rb-0.0.64 lib/atlas_rb/faraday_helper.rb
atlas_rb-0.0.63 lib/atlas_rb/faraday_helper.rb
atlas_rb-0.0.61 lib/atlas_rb/faraday_helper.rb
atlas_rb-0.0.59 lib/atlas_rb/faraday_helper.rb
atlas_rb-0.0.58 lib/atlas_rb/faraday_helper.rb
atlas_rb-0.0.57 lib/atlas_rb/faraday_helper.rb
atlas_rb-0.0.56 lib/atlas_rb/faraday_helper.rb
atlas_rb-0.0.54 lib/atlas_rb/faraday_helper.rb
atlas_rb-0.0.53 lib/atlas_rb/faraday_helper.rb
atlas_rb-0.0.52 lib/atlas_rb/faraday_helper.rb
atlas_rb-0.0.51 lib/atlas_rb/faraday_helper.rb
atlas_rb-0.0.49 lib/atlas_rb/faraday_helper.rb
atlas_rb-0.0.48 lib/atlas_rb/faraday_helper.rb
atlas_rb-0.0.47 lib/atlas_rb/faraday_helper.rb
atlas_rb-0.0.46 lib/atlas_rb/faraday_helper.rb
atlas_rb-0.0.45 lib/atlas_rb/faraday_helper.rb
atlas_rb-0.0.42 lib/atlas_rb/faraday_helper.rb
atlas_rb-0.0.41 lib/atlas_rb/faraday_helper.rb
atlas_rb-0.0.40 lib/atlas_rb/faraday_helper.rb