lib/shark/client/connection.rb in bima-shark-sdk-3.0.0 vs lib/shark/client/connection.rb in bima-shark-sdk-3.1.0
- old
+ new
@@ -36,12 +36,10 @@
url = File.join(site, path)
request_headers = connection_options_headers.merge(headers || {})
request_params = connection_options_params.merge(params || {})
- if Shark.service_token.present?
- request_headers['Authorization'] = "Bearer #{Shark.service_token}"
- end
+ request_headers['Authorization'] = Shark.auth_token if Shark.auth_token.present?
@connection.send(request_action) do |request|
request.url(url)
request.headers.merge!(request_headers)
request.body = body