Permalink
Browse files

Fix for non-REST interface

Basecamp.connection.post expects an iostream, not a plain string.
  • Loading branch information...
1 parent 22d7a00 commit 24689dff7ae63c9f0847b7a651b980aba18660d7 @anibalcucco committed Dec 22, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/basecamp/base.rb
@@ -25,7 +25,7 @@ def connection
# Make a raw web-service request to Basecamp. This will return a Hash of
# Arrays of the response, and may seem a little odd to the uninitiated.
def request(path, parameters = {})
- response = Basecamp.connection.post(path, convert_body(parameters), "Content-Type" => content_type)
+ response = Basecamp.connection.post(path, StringIO.new(convert_body(parameters)), "Content-Type" => content_type)
if response.code.to_i / 100 == 2
result = XmlSimple.xml_in(response.body, 'keeproot' => true, 'contentkey' => '__content__', 'forcecontent' => true)

0 comments on commit 24689df

Please sign in to comment.