Skip to content

Commit 1aa5753

Browse files
committed
set faraday version to 2.7.4
change Faraday authorization methodology more liberal versioning of Faraday
1 parent 12db9dd commit 1aa5753

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ecwid_api.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ Gem::Specification.new do |spec|
2121
spec.add_development_dependency "rake"
2222
spec.add_development_dependency "rspec"
2323

24-
spec.add_dependency "faraday", "~> 2.7.4"
24+
spec.add_dependency "faraday", ">= 2.7.4"
2525
end

lib/ecwid_api/client.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def initialize(store_id, token, options={})
3232
options[:adapter] ||= Faraday.default_adapter
3333
@store_id, @token, @adapter = store_id, token, options[:adapter]
3434

35-
@connection = Faraday.new(url: store_url(uri_base: options[:uri_base]), params: { token: @token }) do |conn|
35+
@connection = Faraday.new(url: store_url(uri_base: options[:uri_base]), headers: { 'Authorization' => "Bearer #{@token}" }) do |conn|
3636
# conn.request :oauth2, token, param_name: :token, token_type: :param
3737
conn.request :json
3838
conn.response :json

0 commit comments

Comments
 (0)