0

I am trying to use the rest-client library of rails. Can anyone help me understand this code.

RestClient::Resource.new(@service_url).put :account => {:db_url => @config_vars['DATABASE_URL']}

I know it sends a put REST request, but how is the :account => {:db_url => @config_vars['DATABASE_URL']}part sent. I mean, what will the body of the request be like?

thanks

user3242743
  • 1,751
  • 5
  • 22
  • 32

1 Answers1

1

The request body of the PUT request will be JSON:

"account": {
  "db_url": <whatever @config_vars['DATABASE_URL'] is>
}
ddavison
  • 28,221
  • 15
  • 85
  • 110