lib/spark_api/authentication/oauth2.rb in spark_api-1.5.2 vs lib/spark_api/authentication/oauth2.rb in spark_api-1.5.3
- old
+ new
@@ -40,9 +40,10 @@
# Perform an HTTP request (no data)
def request(method, path, body, options={})
escaped_path = Addressable::URI.escape(path)
connection = @client.connection(true) # SSL Only!
+ connection.headers.merge!(options.delete(:override_headers) || {})
connection.headers.merge!(self.auth_header)
unless (@client.api_user.nil? || options[:ApiUser])
options.merge!(:ApiUser => "#{@client.api_user}")
end