Module: ResourceMethods::ClassMethods

Defined in:
lib/music_xray_api/base.rb

Instance Method Summary collapse

Instance Method Details

#set_headersObject



35
36
37
38
39
40
41
# File 'lib/music_xray_api/base.rb', line 35

def set_headers
  self.site = MusicXrayApi::Base.api_endpoint
  self.format = :xml
  date = MusicXrayApi::Base.rfc2616(Time.now)
  headers['Date'] = date.to_s
  headers['X-Xray-Authorization'] = MusicXrayApi::Base.sign_https_requestv3(date)
end