lib/rest_adapter.rb in dm-rest-adapter-0.9.9 vs lib/rest_adapter.rb in dm-rest-adapter-0.9.10
- old
+ new
@@ -1,17 +1,17 @@
require 'net/http'
require 'pathname'
require 'rexml/document'
require 'rubygems'
-gem 'dm-core', '~>0.9.9'
+gem 'dm-core', '~>0.9.10'
require 'dm-core'
-gem 'extlib', '~>0.9.9'
+gem 'extlib', '~>0.9.10'
require 'extlib'
-#gem 'dm-serializer', '~>0.9.9'
+#gem 'dm-serializer', '~>0.9.10'
require 'dm-serializer'
require Pathname(__FILE__).dirname + 'rest_adapter/version'
# TODO: Abstract XML support out from the protocol
@@ -159,10 +159,10 @@
end
end
def http_post(uri, data)
request do |http|
- request = Net::HTTP::Post.new(uri, data, {"Content-Type", "application/xml"})
+ request = Net::HTTP::Post.new(uri, data, 'Content-Type' => 'application/xml')
request.basic_auth(@uri[:login], @uri[:password]) unless @uri[:login].blank?
http.request(request)
end
end