Using RestClient for communication between server and client

Hello,

I’m using class RestClient for communication between server and client.
One example is:

params = {:status => “finished”}
resource = RestClient::Resource.new
http://localhost:3000/BuildJob/220376999
begin
resource.put params, :content_type => ‘text/plain’
rescue Exception => err
puts err.to_s
end

where “status” is a string field in model class “BuildJob” and
“220376999” is the id of the BuildJob.

What I want to do is updating the field “status” in the model
“BuildJob”. I always get the error:

“HTTP status code 500”

I’m already using the following command to retrieve information about
build jobs:

xml = RestClient.get “http://localhost:3000/BuildJob?status=pending

This code is functioning without errors.

Any idea what’s wrong?

Thanks
Martin