lib/frenetic/configuration.rb in frenetic-0.0.1.alpha1 vs lib/frenetic/configuration.rb in frenetic-0.0.1
- old
+ new
@@ -13,10 +13,14 @@
config[:username] = config[:api_key] if config[:api_key]
config[:headers] ||= {}
config[:request] ||= {}
- config[:headers][:accept] ||= "application/hal+json"
+ if config[:"content-type"]
+ config[:headers][:accepts] = config[:"content-type"]
+ else
+ config[:headers][:accepts] = "application/hal+json"
+ end
# Copy the config into this Configuration instance.
config.each { |k, v| self[k] = v }
super()
\ No newline at end of file