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