# Using RestClient for communication between server and client

**URL:** <https://www.ruby-forum.com/t/using-restclient-for-communication-between-server-and-client/176803>\
**Category:** Rails\
**Created:** [October 6, 2009, 12:31pm UTC](https://www.ruby-forum.com/t/using-restclient-for-communication-between-server-and-client/176803 "2009-10-06T12:31:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![focusmh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/58f4c7/32.png) [@focusmh](https://www.ruby-forum.com/u/focusmh)\
**Post date:** [October 6, 2009, 12:31pm UTC](https://www.ruby-forum.com/t/using-restclient-for-communication-between-server-and-client/176803/1 "2009-10-06T12:31:05Z")

</div>

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](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](http://localhost:3000/BuildJob?status=pending)”

This code is functioning without errors.

Any idea what’s wrong?

Thanks  
Martin
