[rt-users] Ruby -> REST, part 2

Tom Lahti toml at bitstatement.net
Thu Apr 23 13:14:10 EDT 2009

> Content-Disposition: form-data; name="content"
> Ticket: 5702
> Action: comment
> Text: Adding attachment(s).
> Attachment: attachment.txt

Your form is wrong.

This is a different issue than what I had, but the results of that 
exercise are a ruby library which has been open-sourced.  You can make 
your life a lot easier by installing and using rt-client from rubyforge. 
  "gem install rt-client" should do the trick, and then:

rt= RT_Client.new( :server  => "https://your.rt-server.com/",
                    :user    => "rt_user",
                    :pass    => "rt_pass" )
rt.comment( :id   => 5702,
             :Text => "Adding attachment(s).",
             :Attachment => "attachment.txt" )

and the library will take care of all the gory details for you.

More information about the rt-users mailing list