aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/lib/active_resource/connection.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activeresource/lib/active_resource/connection.rb')
-rw-r--r--activeresource/lib/active_resource/connection.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/activeresource/lib/active_resource/connection.rb b/activeresource/lib/active_resource/connection.rb
index cc98645fdc..22689444b2 100644
--- a/activeresource/lib/active_resource/connection.rb
+++ b/activeresource/lib/active_resource/connection.rb
@@ -33,6 +33,11 @@ module ActiveResource
def requests
@@requests ||= []
end
+
+ def default_header
+ class << self ; attr_reader :default_header end
+ @default_header = { 'Content-Type' => 'application/xml' }
+ end
end
def initialize(site)
@@ -44,15 +49,15 @@ module ActiveResource
end
def delete(path)
- request(:delete, path)
+ request(:delete, path, self.class.default_header)
end
def put(path, body = '')
- request(:put, path, body)
+ request(:put, path, body, self.class.default_header)
end
def post(path, body = '')
- request(:post, path, body)
+ request(:post, path, body, self.class.default_header)
end
private