lib/yammer/client.rb in yammer-client-0.1.6 vs lib/yammer/client.rb in yammer-client-0.1.7

- old
+ new

@@ -20,11 +20,11 @@ include Yammer::Api::Invitation include Yammer::Api::PendingAttachment include Yammer::Api::Subscription include Yammer::Api::OpenGraphObject - attr_reader :site_url, :headers, :connection_options + attr_reader :site_url, :default_headers, :connection_options attr_accessor :client_id, :client_secret, :access_token def initialize(opts={}) Yammer::Configurable.keys.each do |key| @@ -73,13 +73,13 @@ # @param path [string] # @param params [Hash] # @return [Yammer::ApiResponse] # @!visibility private def request(method, path, params={}) - @headers['Authorization'] ||= "Bearer #{@access_token}" + headers = @default_headers.merge({'Authorization' => "Bearer #{@access_token}"}) result = http_client.send_request(method, path, { - :params => params, - :headers => @headers + :params => params, + :headers => headers }) result end end end